summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-15 06:47:22 +0200
committerSven Gothel <[email protected]>2023-05-15 06:47:22 +0200
commit900c35c6a49e0d53e38dd07da709bf81e28abd3e (patch)
tree97a10ef8c5e0609f66545f19a0b370e183af132f /src/newt/classes
parentcc5e46d8096a9395246518ad413385167f5f8eee (diff)
HiDPI: Revise AWT GLCanvas/GLJPanel ScalableSurface: No setSurfaceScale(), have AWT toolkit define pixelScale only (simplification)
This aligns with Glenn's initial AWT patch commit e5e7514d649cd7dd28bbb8e04b72338dc09c2c83, i.e. removing redundancies... Tested on Linux, Windows and MacOS w/ GLCanvas, GLJPanel and GLWindow using pixelScale values: - Linux: 1, 2 - Windows: 1, 1.25, 2 - MacOS: 1, 2
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/Window.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java9
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java9
3 files changed, 19 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index 60ed53c9f..47c03557e 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2010 JogAmp Community. All rights reserved.
+ * Copyright 2010-2023 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 1435aa20a..cbac22e26 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -482,6 +482,15 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
return window.convertToPixelUnits(windowUnitsAndResult);
}
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This implementation returns true, i.e. supporting manual change of pixel-scale.
+ * </p>
+ */
+ @Override
+ public final boolean canSetSurfaceScale() { return true; }
+
@Override
public final boolean setSurfaceScale(final float[] pixelScale) {
return window.setSurfaceScale(pixelScale);
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 0a8bc0e63..a19218ead 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -2696,6 +2696,15 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
/**
* {@inheritDoc}
+ * <p>
+ * This implementation returns true, i.e. supporting manual change of pixel-scale.
+ * </p>
+ */
+ @Override
+ public final boolean canSetSurfaceScale() { return true; }
+
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean setSurfaceScale(final float[] pixelScale) {