aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Jordan <[email protected]>2020-02-26 08:44:25 +1300
committerGitHub <[email protected]>2020-02-26 08:44:25 +1300
commitc5aeffb1871bd5b184d6faa937fea33ba709103d (patch)
tree0ff0caf248237ce2b30e78844f2c76608ac9ffa5
parentb10001eb92e74002e7034309193ea4131e6157ab (diff)
parentac5279a0929a1ef69b7c546497c52d778a835d75 (diff)
Merge pull request #12 from etsinko/fixes-to-canvas3d-get-pixel-sizes
Fixes to Canvas3D.getPixelWidth() and Canvas3D.getPixelHeight()
-rw-r--r--src/main/java/org/jogamp/java3d/Canvas3D.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/jogamp/java3d/Canvas3D.java b/src/main/java/org/jogamp/java3d/Canvas3D.java
index 9188ae0..d099f5e 100644
--- a/src/main/java/org/jogamp/java3d/Canvas3D.java
+++ b/src/main/java/org/jogamp/java3d/Canvas3D.java
@@ -2851,7 +2851,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
public int getPixelWidth() {
if (canvasViewCache != null) {
synchronized (canvasViewCache) {
- return canvasViewCache.getCanvasWidth();
+ return (int) (getWidth() * canvasViewCache.getHiDPIXScale());
}
}
return getWidth();
@@ -2863,7 +2863,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
public int getPixelHeight() {
if (canvasViewCache != null) {
synchronized (canvasViewCache) {
- return canvasViewCache.getCanvasHeight();
+ return (int) (getHeight() * canvasViewCache.getHiDPIYScale());
}
}
return getHeight();