We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all,
I just started using Processing, I finished Chaper 2 of Ira Greenberg & co’s Processing: Creative Coding and Generative Art in Processing 2.
That's where I am. It is actually pretty exciting but I am already a bit confused about the units of measure in Processing 2. From the book and the reference at http://processing.org/reference/size_.html I understand that writing size(1000, 1000) will draw a window that is 1000 px wide and 1000 px high. Unfortunately the window drawn on my screen is 2000 x 2000 px.
I do not know how to save/export my sketch yet, so I just take screenshots. I obtain the measurements in Photoshop.
So 1000 px becomes 2000 px. OK I though maybe Processing doubles the pixels for retina screens. But that is not the case.
size(100, 100);
noStroke();
fill(255, 0, 0);
rect(5, 5, 5, 5);
draws a 256 x 256 px window with a square that is x=38, y=38, w=10, w=10 px. That is an unexpected result.
Is this a bug? If not what am I missing? Does Processing double pixels for retina screens?
My setup is:
Answers
Read this: http://wiki.processing.org/w/Supported_Platforms#Retina_Support
It states that Processing needs the hint() function to be applied in setup(). So in your case, you would do this:
Try that.
-- MenteCode
Thanks MenteCode!