mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fix PShape ellipses
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user