changes in progress for 86

This commit is contained in:
benfry
2005-05-01 18:52:27 +00:00
parent f3b1c9a3c9
commit 9a5d1d4be3
6 changed files with 86 additions and 67 deletions

View File

@@ -343,20 +343,22 @@ public class PGraphics2 extends PGraphics {
public void endShape() {
switch (shape) {
case LINE_STRIP:
stroke_shape(gpath);
break;
if (gpath != null) { // make sure something has been drawn
switch (shape) {
case LINE_STRIP:
stroke_shape(gpath);
break;
case LINE_LOOP:
gpath.closePath();
stroke_shape(gpath);
break;
case LINE_LOOP:
gpath.closePath();
stroke_shape(gpath);
break;
case POLYGON:
gpath.closePath();
draw_shape(gpath);
break;
case POLYGON:
gpath.closePath();
draw_shape(gpath);
break;
}
}
shape = 0;
}