rename retina prop based on actual use

This commit is contained in:
Ben Fry
2017-02-10 16:30:02 -05:00
parent 05f869dfc5
commit 38e99d5984
+10 -4
View File
@@ -735,6 +735,10 @@ public class Toolkit {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
/**
* Create an Image to be used as an offscreen drawing context,
* automatically doubling the size if running on a retina display.
*/
static public Image offscreenGraphics(Component comp, int width, int height) {
int m = Toolkit.isRetina() ? 2 : 1;
//return comp.createImage(m * dpi(width), m * dpi(height));
@@ -855,7 +859,9 @@ public class Toolkit {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
static Boolean highResProp;
// Changed to retinaProp instead of highResProp because only Mac
// "retina" displays use this mechanism for high-resolution scaling.
static Boolean retinaProp;
static public boolean highResImages() {
@@ -864,10 +870,10 @@ public class Toolkit {
static public boolean isRetina() {
if (highResProp == null) {
highResProp = checkRetina();
if (retinaProp == null) {
retinaProp = checkRetina();
}
return highResProp;
return retinaProp;
}