Skip to content

Commit f54f3cd

Browse files
committed
Fix PShape ellipses
1 parent c755524 commit f54f3cd

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

core/src/processing/core/PGraphics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,8 @@ public PShape createShape(int kind, float... p) {
17951795
return createShapePrimitive(kind, p);
17961796

17971797
} else if (kind == ELLIPSE) {
1798-
if (len != 4 && len != 5) {
1799-
throw new IllegalArgumentException("Use createShape(ELLIPSE, x, y, w, h) or createShape(ELLIPSE, x, y, w, h, mode)");
1798+
if (len != 4) {
1799+
throw new IllegalArgumentException("Use createShape(ELLIPSE, x, y, w, h)");
18001800
}
18011801
return createShapePrimitive(kind, p);
18021802

core/src/processing/core/PShape.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,9 +1654,8 @@ protected void drawPrimitive(PGraphics g) {
16541654
}
16551655
}
16561656
} else if (kind == ELLIPSE) {
1657-
g.ellipseMode(CORNER);
1658-
g.ellipse(params[0], params[1], params[2], params[3]);
1659-
1657+
g.ellipse(params[0], params[1],
1658+
params[2], params[3]);
16601659
} else if (kind == ARC) {
16611660
if (params.length == 6) {
16621661
g.arc(params[0], params[1],

core/src/processing/opengl/PShapeOpenGL.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,9 +3211,6 @@ protected void tessellateEllipse() {
32113211
b = params[1];
32123212
c = params[2];
32133213
d = params[3];
3214-
if (params.length == 5) {
3215-
mode = (int)(params[4]);
3216-
}
32173214
}
32183215

32193216
float x = a;

0 commit comments

Comments
 (0)