Skip to content

Commit e5c55ec

Browse files
committed
repair curveVertex() init logic in FX2D (fixes #3960)
1 parent 2b3a055 commit e5c55ec

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

core/src/processing/javafx/PGraphicsFX2D.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -574,28 +574,17 @@ public void quadraticVertex(float x2, float y2, float z2,
574574

575575

576576
@Override
577-
protected void curveVertexCheck() {
578-
if (shape != POLYGON) {
579-
throw new RuntimeException("You must use beginShape() or " +
580-
"beginShape(POLYGON) before curveVertex()");
581-
}
582-
583-
curveInitCheck();
584-
577+
protected void curveVertexSegment(float x1, float y1,
578+
float x2, float y2,
579+
float x3, float y3,
580+
float x4, float y4) {
585581
if (curveCoordX == null) {
586582
curveCoordX = new float[4];
587583
curveCoordY = new float[4];
588584
curveDrawX = new float[4];
589585
curveDrawY = new float[4];
590586
}
591-
}
592-
593587

594-
@Override
595-
protected void curveVertexSegment(float x1, float y1,
596-
float x2, float y2,
597-
float x3, float y3,
598-
float x4, float y4) {
599588
curveCoordX[0] = x1;
600589
curveCoordY[0] = y1;
601590

0 commit comments

Comments
 (0)