FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 893 : text box doesn't keep the boundary.
Last modified: 2008-09-16 21:52
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
kapin
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-08-24 11:42
I am just a beginner. but while I am studying about text, just noticed that
>> text(stringdata, x, y, width, height);
the width and height setting doen't work properly.
for example, when I set the width and height at 150 and 280 in 300 by 300 window
size, a simple sentence goes over 150 width.
Check that please. thanks.
Additional Comment
#1 From fry 2008-08-24 11:54
are you using release 0148? if so, please include an example sketch that
shows the problem in the bug report.
if you're using 0135, you should be using 0148, which fixes this problem.
Additional Comment
#2 From splat 2008-09-16 12:22
This problem is more extensive than that....
here is an example:
String s = "The quick brown fox jumped over the lazy dog.";
text(s, 15, 20, 70, 70);
text("ouch", 15, 20*10, 70, 70);
which prints to the screen:
The quick
brown fox
jumped over
the laxy dog
ouch
brown fox
jumped over
the lazy dog
In short, when using a bounding box with text the function, it retains it's last values.
I was able to get past this issue poorly by filling the buffer with spaces:
textSize(12);
String s = "The quick brown fox jumped over the lazy dog.";
text(s, 15, 20, 70, 70);
text(" ",0,0);
text("ouch", 15, 20*10, 70, 70);
which yeilds:
ouch
lazy dog
which speaks for itself ;)
Additional Comment
#3 From splat 2008-09-16 12:24
... and yes 148
Additional Comment
#4 From fry 2008-09-16 21:52
already fixed for 0149.