Size() not working

Hi there,

I’m having problems with size(), it doesn’t work in any sketch. I have even tried to put in on settings() but it doesn’t work either. I have tried Processing 3.5.3 and 3.5.4.

void setup(){
  size(100,100);
}

void draw(){
  background(0);
}

Are there any error messages that might give a hint where the problem could be?

Notice that the standard size of a processing sketch is 100x100 pixels, so you can’t see a difference between a

void setup(){
//empty
}

and a

void setup(){
size(100,100);
}

setup code.

2 Likes

Notice also that the minimum size of a window itself may be larger than the smallest canvas.

So size(600,300) and size(300,600) should be obviously different, but if your minimum window frame is 200 then size(150,150) and size(100,100) will only look different subtley – the gray background canvas area in the center of the window will change size.