Hi,
Relative noob here, just wanted to ask a quick question.
On this page http://processing.org/tutorials/overview/ - the Overview tutorial - there's this example code:
I feel that a more correct version would be:
Just wondering because this would be pretty confusing to the ultra-new user.
Relative noob here, just wanted to ask a quick question.
On this page http://processing.org/tutorials/overview/ - the Overview tutorial - there's this example code:
void setup() {It says "... when the mouse is pressed, the screen is cleared via the background() function". This is true; however, if I use that code it also starts me with a grey background that changes to orange on pressing the mouse, because there's no background colour specified in the setup.
size(400, 400);
stroke(255);
}
void draw() {
line(150, 25, mouseX, mouseY);
}
void mousePressed() {
background(192, 64, 0);
}
I feel that a more correct version would be:
void setup() {... that way the background is already orange when the sketch runs, and clears the drawing on mouse click back to orange.
size(400, 400);
stroke(255);
background(192, 64, 0);
}
void draw() {
line(150, 25, mouseX, mouseY);
}
void mousePressed() {
background(192, 64, 0);
}
Just wondering because this would be pretty confusing to the ultra-new user.
1