FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 836 : fill() no longer works when called in setup() for versions 0138 or later
Last modified: 2008-06-27 15:15
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
DUPLICATE of bug
767
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
kraelen
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-06-27 15:06
AMD64 X2 3GHZ
Vista 64 sp1
4GB ram
Nvidia 8800gt 512MB
_______________________________________________________________________________
void setup()
{
size(400, 400);
background(0);
fill(0, 255, 0);
}
void draw()
{
rect(0, height / 2, width, height / 2);
}
_______________________________________________________________________________
When this code is run using 0135 the bottom half of the window is green.
But when run using 0138 and later (tested in 0142) the rectangle is white,
as if fill(0,255,0) was ignored. I presume the problem started in 0136 with
the changeover to java 1.5.
Furthermore just to make things a little more confusing (at least for me),
if the size() is less than 400 for either width or height, then it works
fine and the rectangle is green.
_______________________________________________________________________________
Quick fix:
If fill() is called within draw() then the rectangle is green, no matter
the version or size. It seems a shame to have to call it on every single
draw though.
Additional Comment
#1 From fry 2008-06-27 15:15
*** This bug has been marked as a duplicate of
767
***