diff options
author | Sven Gothel <[email protected]> | 2023-01-31 04:20:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-31 04:20:16 +0100 |
commit | ed4cf029c22c3380e04971011a51ef2c666aa6d9 (patch) | |
tree | e4a07abb2b064949deddc3073e082cf1e4698839 /src/newt/classes/jogamp | |
parent | 54760cd667365277c9c2473350bdc56ba5398348 (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.java | 5 |
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); } |