File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ public PShape getShape(char ch, float detail) {
740
740
// six element array received from the Java2D path iterator
741
741
float [] iterPoints = new float [6 ];
742
742
// array passed to createGlyphVector
743
- char [] textArray = new char [] { ch };
743
+ char [] textArray = { ch };
744
744
745
745
//Graphics2D graphics = (Graphics2D) this.getGraphics();
746
746
//FontRenderContext frc = graphics.getFontRenderContext();
@@ -755,16 +755,17 @@ public PShape getShape(char ch, float detail) {
755
755
shp .getPathIterator (null , detail ); // convert to line segments
756
756
757
757
int contours = 0 ;
758
+ s .beginShape ();
759
+ s .noStroke ();
760
+ s .fill (0 );
758
761
while (!iter .isDone ()) {
759
762
int type = iter .currentSegment (iterPoints );
760
763
switch (type ) {
761
764
case PathIterator .SEG_MOVETO : // 1 point (2 vars) in textPoints
762
- if (contours == 0 ) {
763
- s .beginShape ();
764
- } else {
765
+ if (contours > 0 ) {
765
766
s .beginContour ();
766
767
}
767
- contours ++ ;
768
+ ++ contours ;
768
769
s .vertex (iterPoints [0 ], iterPoints [1 ]);
769
770
break ;
770
771
You can’t perform that action at this time.
0 commit comments