Fill the window with white rectangles
in
Programming Questions
•
3 years ago
I must be missing something really stupid. Why doesn't the following code continually fill the window with white?
(I know this is inefficient...I'm just boiling down a more complex idea (that requires rects) to the most basic)
void setup(){
size(50,50);
}
void draw(){
fill(255,255);
for(int y=0;y<height;y++) {
for(int x=0;x<width;x++) {
rect(x,y,1,1);
}
}
}
(I know this is inefficient...I'm just boiling down a more complex idea (that requires rects) to the most basic)
void setup(){
size(50,50);
}
void draw(){
fill(255,255);
for(int y=0;y<height;y++) {
for(int x=0;x<width;x++) {
rect(x,y,1,1);
}
}
}
1