Management of size() on Retina displays

edited July 2017 in How To...

First, let me say I'm new to Processing, but an accomplished programmer and was recently looking for something for quick algorithm prototyping, and have found Processing a perfect match for what I was looking for.

My question relates to size(), pixelDensity() and displayDensity() ... I believe I understand them correctly, the only thing that tripped me up was the need to use pixelWidth and pixelHeight when doing pixel based operations. But it would seem to me that if I'm creating something for a "normal" display, to be projected say, then I might use something like size(1920,1080). But on a retina display like my MacBookPro I would normally use something smaller, but knowing that the quality will be the same as higher in that smaller window.

In short it doesn't seem that I can make decisions on the values for size() based upon displayDensity()? It would seem like a natural thing to want to do if developing for both retina and non-retina. Or more fundamental, I would like to be able to base the values for size() on the display pixel dimensions. Any way to do this?

Sign In or Register to comment.