summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-31 04:20:16 +0100
committerSven Gothel <[email protected]>2023-01-31 04:20:16 +0100
commited4cf029c22c3380e04971011a51ef2c666aa6d9 (patch)
treee4a07abb2b064949deddc3073e082cf1e4698839 /src/newt/classes/jogamp
parent54760cd667365277c9c2473350bdc56ba5398348 (diff)
NativeWindow: Add getBounds() (moved from NEWT Window) and getSurfaceBounds()
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 8567be5cc..67f1e863b 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -2621,6 +2621,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
@Override
+ public final Rectangle getSurfaceBounds() {
+ return new Rectangle(pixelPos[0], pixelPos[1], pixelSize[0], pixelSize[1]);
+ }
+
+ @Override
public final int[] convertToWindowUnits(final int[] pixelUnitsAndResult) {
return SurfaceScaleUtils.scaleInv(pixelUnitsAndResult, pixelUnitsAndResult, hasPixelScale);
}