From 01c42bddcb9541ecbf3f8accb01054e839100461 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 5 Oct 2015 11:51:31 -0400 Subject: [PATCH] repair curveVertex() init logic in FX2D (fixes #3960) --- core/src/processing/javafx/PGraphicsFX2D.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/core/src/processing/javafx/PGraphicsFX2D.java b/core/src/processing/javafx/PGraphicsFX2D.java index e23c5b969..d2f4fdb0a 100644 --- a/core/src/processing/javafx/PGraphicsFX2D.java +++ b/core/src/processing/javafx/PGraphicsFX2D.java @@ -574,28 +574,17 @@ public class PGraphicsFX2D extends PGraphics { @Override - protected void curveVertexCheck() { - if (shape != POLYGON) { - throw new RuntimeException("You must use beginShape() or " + - "beginShape(POLYGON) before curveVertex()"); - } - - curveInitCheck(); - + protected void curveVertexSegment(float x1, float y1, + float x2, float y2, + float x3, float y3, + float x4, float y4) { if (curveCoordX == null) { curveCoordX = new float[4]; curveCoordY = new float[4]; curveDrawX = new float[4]; curveDrawY = new float[4]; } - } - - @Override - protected void curveVertexSegment(float x1, float y1, - float x2, float y2, - float x3, float y3, - float x4, float y4) { curveCoordX[0] = x1; curveCoordY[0] = y1;