From ca0f78de4cf7bdf563ffda900668b0b833fb1765 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Tue, 18 Aug 2015 16:47:38 -0400 Subject: [PATCH] FX - fix rect size --- core/src/processing/javafx/PGraphicsFX2D.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/processing/javafx/PGraphicsFX2D.java b/core/src/processing/javafx/PGraphicsFX2D.java index 63ebb4a9c..dd9774533 100644 --- a/core/src/processing/javafx/PGraphicsFX2D.java +++ b/core/src/processing/javafx/PGraphicsFX2D.java @@ -658,8 +658,8 @@ public class PGraphicsFX2D extends PGraphics { protected void rectImpl(float x1, float y1, float x2, float y2) { // rect.setFrame(x1, y1, x2-x1, y2-y1); // drawShape(rect); - if (fill) context.fillRect(x1, y1, x2, y2); - if (stroke) context.strokeRect(x1, y1, x2, y2); + if (fill) context.fillRect(x1, y1, x2 - x1, y2 - y1); + if (stroke) context.strokeRect(x1, y1, x2 - x1, y2 - y1); }