Fix PShape ellipses

This commit is contained in:
Jakub Valtar
2015-07-29 17:14:48 -04:00
parent 771d24c566
commit 937942b5ef
3 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -1795,8 +1795,8 @@ public class PGraphics extends PImage implements PConstants {
return createShapePrimitive(kind, p);
} else if (kind == ELLIPSE) {
if (len != 4 && len != 5) {
throw new IllegalArgumentException("Use createShape(ELLIPSE, x, y, w, h) or createShape(ELLIPSE, x, y, w, h, mode)");
if (len != 4) {
throw new IllegalArgumentException("Use createShape(ELLIPSE, x, y, w, h)");
}
return createShapePrimitive(kind, p);
+2 -3
View File
@@ -1654,9 +1654,8 @@ public class PShape implements PConstants {
}
}
} else if (kind == ELLIPSE) {
g.ellipseMode(CORNER);
g.ellipse(params[0], params[1], params[2], params[3]);
g.ellipse(params[0], params[1],
params[2], params[3]);
} else if (kind == ARC) {
if (params.length == 6) {
g.arc(params[0], params[1],
@@ -3211,9 +3211,6 @@ public class PShapeOpenGL extends PShape {
b = params[1];
c = params[2];
d = params[3];
if (params.length == 5) {
mode = (int)(params[4]);
}
}
float x = a;