summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes/com/jogamp')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java b/src/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java
index 33a1955e8..9b4d7ec68 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java
@@ -46,6 +46,9 @@ public class Rectangle implements Cloneable, RectangleImmutable {
this.width=width;
this.height=height;
}
+ public Rectangle(final RectangleImmutable s) {
+ set(s);
+ }
@Override
public Object cloneMutable() {
@@ -82,6 +85,12 @@ public class Rectangle implements Cloneable, RectangleImmutable {
this.width = s.width;
this.height = s.height;
}
+ public final void set(final RectangleImmutable s) {
+ this.x = s.getX();
+ this.y = s.getY();
+ this.width = s.getWidth();
+ this.height = s.getHeight();
+ }
public final void setX(final int x) { this.x = x; }
public final void setY(final int y) { this.y = y; }
public final void setWidth(final int width) { this.width = width; }
@@ -196,6 +205,7 @@ public class Rectangle implements Cloneable, RectangleImmutable {
}
}
{
+ // FIXME: Invalid, position needs to be compared differently
final int sq = x*y;
final int xsq = d.getX()*d.getY();