We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have following code that draws a certain amount of lines. How do I save the end product of the sketch as a picture? If i use save(), it tells me that im mixing up active and static modes. Thanks in advance!
int x = 10;
int y = 10;
int i = 0;
void setup() {
size(640, 480);
background(50);
}
void draw() {
stroke(#6EBC8D);
i++;
if (i<47) {
line(10, x, 630, y);
}
if (x < height-10) {
x = x + 10;
}
if (x >= height-10) {
y= y+10;
}
stroke(#F01616);
if (i<47) {
line(10, x+6, 630, y+6);
}
if (x < height-10) {
x = x + 10;
}
if (x >= height-10 ) {
y= y+10;
}
}
Answers
https://Processing.org/reference/saveFrame_.html