From ed4cf029c22c3380e04971011a51ef2c666aa6d9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 31 Jan 2023 04:20:16 +0100 Subject: NativeWindow: Add getBounds() (moved from NEWT Window) and getSurfaceBounds() --- src/newt/classes/jogamp/newt/WindowImpl.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newt/classes/jogamp') 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 @@ -2620,6 +2620,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer return pixHeight; } + @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); -- cgit v1.2.3