From ef9f9a80ca3d8666b924101bdaf1eb2ac701de3e Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 28 Jun 2005 15:45:07 +0000 Subject: [PATCH] fix for text box sizing bug --- core/PApplet.java | 2 +- core/PGraphics.java | 2 +- core/todo.txt | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/PApplet.java b/core/PApplet.java index 8f6f5ecfb..b08d1d8ca 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -832,7 +832,7 @@ public class PApplet extends Applet if (renderer.equals(OPENGL)) { throw new RuntimeException("createGraphics() with OPENGL is not " + "supported. Use P3D instead."); - } + } PGraphics outgoing; try { diff --git a/core/PGraphics.java b/core/PGraphics.java index d9aed0166..776b23a46 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -2004,7 +2004,7 @@ public class PGraphics extends PImage implements PConstants { float spaceWidth = textWidth(' '); float runningX = x1; //boxX1; float currentY = y1; //boxY1; - float boxWidth = x2 - x2; //boxX2 - boxX1; + float boxWidth = x2 - x1; //boxX2 - boxX1; // lineX is the position where the text starts, which is adjusted // to left/center/right based on the current textAlign diff --git a/core/todo.txt b/core/todo.txt index 51ebef0dd..536134605 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -36,8 +36,6 @@ X fix bug where noLoop() was waiting 10 secs to call exit() X add ability to draw text from the current text position _ need to add this to the documentation -_ testing cvs here.. and again - _ leading looks too big, at least in PGraphics2 with news gothic _ though it may be the converted version of the .ttf?