How will resolution independence be handled in jdk8?
Hendrik Schreiber
hs at tagtraum.com
Tue Apr 23 08:05:45 PDT 2013
Hi,
I'm aware that there is an ongoing effort to support resolution independence in JDK 8.
E.g. http://bugs.sun.com/view_bug.do?bug_id=8000629 - I am assuming this will draw text and built-in UI elements with the native resolution.
What I wonder, how will we as developers be able to draw images with sub-pixel resolution?
Will we simply be able to call
graphics.drawImage(img, x, y, w, h, obs);
and if the image is twice the size of w/h (=4xarea) and a Retina display is present, the image is drawn with sub-pixel resolution? I.e. in effect not scaled, but simply drawn?
If so, will there be a way to find out the scale factor, i.e. the factor between pixel based resolution and true display sub-pixel capability? To illustrate, for Retina this factor is 2x. After all, we need to know, what kind of images to load for a high resolution capable app.
Last but not least, the bug mentioned above mentions the info.plist flag
<key>NSHighResolutionCapable</key><true/>
Will it be necessary to set this? What exactly does it do?
Thank you,
-hendrik
More information about the macosx-port-dev
mailing list