diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java | 22 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/OffscreenWindow.java | 3 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java b/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java index aa511b625..7f5f65b9f 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java @@ -102,9 +102,25 @@ public class Point implements Cloneable, PointImmutable { return x + " / " + y; } - public final void set(final int x, final int y) { this.x = x; this.y = y; } - public final void setX(final int x) { this.x = x; } - public final void setY(final int y) { this.y = y; } + /** + * Set this instance's x- and y-component. + * @param x value for x-component + * @param y value for y-component + * @return this instance for scaling + */ + public final Point set(final int x, final int y) { this.x = x; this.y = y; return this; } + /** + * Set this instance's x--component. + * @param x value for x-component + * @return this instance for scaling + */ + public final Point setX(final int x) { this.x = x; return this; } + /** + * Set this instance's y-component. + * @param y value for y-component + * @return this instance for scaling + */ + public final Point setY(final int y) { this.y = y; return this; } /** * Translate this instance's x- and y-components, diff --git a/src/newt/classes/jogamp/newt/OffscreenWindow.java b/src/newt/classes/jogamp/newt/OffscreenWindow.java index be07cda0a..299bb1f73 100644 --- a/src/newt/classes/jogamp/newt/OffscreenWindow.java +++ b/src/newt/classes/jogamp/newt/OffscreenWindow.java @@ -140,8 +140,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { @Override public Point getLocationOnScreen(final Point storage) { if(null!=storage) { - storage.set(0, 0); - return storage; + return storage.set(0, 0); } return new Point(0,0); } |