diff options
author | Sven Gothel <[email protected]> | 2015-09-18 09:17:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-18 09:17:39 +0200 |
commit | 6228d072a2129b22d259c37987775e596957789a (patch) | |
tree | eb18de17e1b3841e894d21e5a0453efc0bd6c644 /src/newt/classes | |
parent | f2e1e9bb13679716148f45a66e99da0de114f4a1 (diff) |
TestGearsES2*AWT / NewtDemoListener: Show pixel-scale in title bar.
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java index 58484ca57..3e0b4f43c 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java +++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java @@ -423,7 +423,15 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous final float[] sDPI = win.getPixelsPerMM(new float[2]); sDPI[0] *= 25.4f; sDPI[1] *= 25.4f; - win.setTitle("GLWindow["+capsA+"], win: "+win.getBounds()+", pix: "+win.getSurfaceWidth()+"x"+win.getSurfaceHeight()+", sDPI "+sDPI[0]+" x "+sDPI[1]); + final float[] minSurfacePixelScale = win.getMinimumSurfaceScale(new float[2]); + final float[] maxSurfacePixelScale = win.getMaximumSurfaceScale(new float[2]); + final float[] reqSurfacePixelScale = win.getRequestedSurfaceScale(new float[2]); + final float[] hasSurfacePixelScale = win.getCurrentSurfaceScale(new float[2]); + win.setTitle("GLWindow["+capsA+"], win: "+win.getBounds()+", pix: "+win.getSurfaceWidth()+"x"+win.getSurfaceHeight()+", sDPI "+sDPI[0]+" x "+sDPI[1]+ + ", scale[min "+minSurfacePixelScale[0]+"x"+minSurfacePixelScale[1]+", max "+ + maxSurfacePixelScale[0]+"x"+maxSurfacePixelScale[1]+", req "+ + reqSurfacePixelScale[0]+"x"+reqSurfacePixelScale[1]+" -> has "+ + hasSurfacePixelScale[0]+"x"+hasSurfacePixelScale[1]+"]"); } public static PointerIcon[] createPointerIcons(final Display disp) { |