Bug, feature (of MacBook Pro) or user error?

edited December 2013 in Using Processing

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.

size 100

Is this a bug? If not what am I missing? Does Processing double pixels for retina screens?

My setup is:

  • MacBook Pro Early 2013
  • Screen set to "More Space" which is referenced as "Looks like 1920 x 1200" but Photoshop measures it as 3840 x 2400 px.
  • OS X 10.9 (Build 13A603)
  • Processing 2.1

Answers

Sign In or Register to comment.