Skip to content

Commit 2b15285

Browse files
committed
change constants for better error checks (fixes #3776)
1 parent 8738c92 commit 2b15285

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

core/src/processing/core/PShape.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,16 @@ public class PShape implements PConstants {
8484
// /** Generic, only draws its child objects. */
8585
// static public final int GROUP = 0;
8686
// GROUP now inherited from PConstants, and is still zero
87+
88+
// These constants were updated in 3.0b6 so that they could be distinguished
89+
// from others in PConstants and improve how some typos were handled.
90+
// https://github.com/processing/processing/issues/3776
8791
/** A line, ellipse, arc, image, etc. */
88-
static public final int PRIMITIVE = 1;
92+
static public final int PRIMITIVE = 101;
8993
/** A series of vertex, curveVertex, and bezierVertex calls. */
90-
static public final int PATH = 2;
94+
static public final int PATH = 102;
9195
/** Collections of vertices created with beginShape(). */
92-
static public final int GEOMETRY = 3;
96+
static public final int GEOMETRY = 103;
9397
/** The shape type, one of GROUP, PRIMITIVE, PATH, or GEOMETRY. */
9498
protected int family;
9599

core/todo.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ X add surface.setAlwaysOnTop(boolean)
1414
X https://github.com/processing/processing/issues/3718
1515
X Implement standard cursor types in OpenGL
1616
X https://github.com/processing/processing/issues/3554
17+
X Change value of constants PRIMITIVE, PATH, and GEOMETRY constants in PShape
18+
X This avoids a collision with entries in PConstants which causes
19+
X confusing errors or no errors to be thrown at all
20+
X https://github.com/processing/processing/issues/3776
1721

1822
andres
1923
X P2D: error calling surface.setTitle()

todo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ X https://github.com/processing/processing/pull/3684
6161
X Ready to add contributed example packages?
6262
X https://github.com/processing/processing/issues/2953
6363

64+
6465
known issues
6566
_ launch4j doesn't work from folders with non-native charsets
6667
_ anything in CP1252 on an English Windows system is fine

0 commit comments

Comments
 (0)