mirror of
https://github.com/processing/processing4.git
synced 2026-03-24 21:37:47 +01:00
breakShape() replaced by beginContour()/endCountour()
This commit is contained in:
@@ -460,7 +460,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
protected float[] currentTexcoord = { 0, 0 };
|
||||
protected float[] currentStroke = { 0, 0, 0, 1, 1 };
|
||||
|
||||
protected boolean breakShape;
|
||||
protected boolean openContour = false;
|
||||
protected boolean breakShape = false;
|
||||
|
||||
public static int flushMode = FLUSH_WHEN_FULL;
|
||||
// public static int flushMode = FLUSH_AFTER_SHAPE;
|
||||
@@ -1882,7 +1883,21 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
public void breakShape() {
|
||||
public void beginContour() {
|
||||
if (openContour) {
|
||||
showWarning("P3D: Already called beginContour().");
|
||||
return;
|
||||
}
|
||||
openContour = true;
|
||||
}
|
||||
|
||||
|
||||
public void endContour() {
|
||||
if (!openContour) {
|
||||
showWarning("P3D: Need to call beginContour() first.");
|
||||
return;
|
||||
}
|
||||
openContour = false;
|
||||
breakShape = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,10 +118,12 @@ public class PShape3D extends PShape {
|
||||
// Drawing/rendering state
|
||||
|
||||
protected boolean modified;
|
||||
protected boolean breakShape;
|
||||
protected boolean isSolid;
|
||||
protected boolean isClosed;
|
||||
|
||||
protected boolean openContour = false;
|
||||
protected boolean breakShape = false;
|
||||
|
||||
protected boolean hasFill;
|
||||
protected boolean hasLines;
|
||||
protected boolean hasPoints;
|
||||
@@ -297,7 +299,21 @@ public class PShape3D extends PShape {
|
||||
}
|
||||
|
||||
|
||||
public void breakShape() {
|
||||
public void beginContour() {
|
||||
if (openContour) {
|
||||
PGraphics.showWarning("P3D: Already called beginContour().");
|
||||
return;
|
||||
}
|
||||
openContour = true;
|
||||
}
|
||||
|
||||
|
||||
public void endContour() {
|
||||
if (!openContour) {
|
||||
PGraphics.showWarning("P3D: Need to call beginContour() first.");
|
||||
return;
|
||||
}
|
||||
openContour = false;
|
||||
breakShape = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user