diff options
author | Sven Gothel <[email protected]> | 2011-12-24 03:24:29 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-24 03:24:29 +0100 |
commit | 976e47291d052caab4b101d900270a073a3bbb55 (patch) | |
tree | fd9694fbbf652475b9ffeec87e325d36c3099d6d /src/newt/classes/com/jogamp | |
parent | 3f5d71f14506da21db29d050e685a482df47b5cc (diff) |
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
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Screen.java | 14 |
1 files changed, 12 insertions, 2 deletions
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 <b>rotated</b> virtual width. */ public abstract int getWidth(); /** - * @return the current screen height, reflecting {@link ScreenMode} rotation + * @return the <b>rotated</b> virtual height. */ public abstract int getHeight(); |