From 976e47291d052caab4b101d900270a073a3bbb55 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 24 Dec 2011 03:24:29 +0100 Subject: NEWT Screen: Add virtual top-left origin getX()/getY() ; WindowsWindow.c: allow negative coordinates - ScreenImpl: - Use Point & Dimension for holding virtual origin and size - updateScreenSize() -> updateVirtualScreenOriginAndSize() - DimensionImmutable getNativeScreenSizeImpl() -> void getVirtualScreenOriginAndSize(Point virtualOrigin, Dimension virtualSize) - WindowImpl setFullscreen(true): Use Screen virtual origin - WindowsWindow.c - For x/y coords use GET_X_LPARAM/GET_Y_LPARAM which casts '(int)(short)' to preserve negative coordinates. - NewtWindow_setVisiblePosSize() allow negative coordinates --- src/newt/classes/com/jogamp/newt/Screen.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/newt/classes/com') diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java index b6d863965..26f19ad6b 100644 --- a/src/newt/classes/com/jogamp/newt/Screen.java +++ b/src/newt/classes/com/jogamp/newt/Screen.java @@ -120,12 +120,22 @@ public abstract class Screen { public abstract int getIndex(); /** - * @return the current screen width, reflecting {@link ScreenMode} rotation + * @return the x position of the virtual top-left origin. + */ + public abstract int getX(); + + /** + * @return the y position of the virtual top-left origin. + */ + public abstract int getY(); + + /** + * @return the rotated virtual width. */ public abstract int getWidth(); /** - * @return the current screen height, reflecting {@link ScreenMode} rotation + * @return the rotated virtual height. */ public abstract int getHeight(); -- cgit v1.2.3