Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / geom / Rectangle2D.js
index 3127449..a588bff 100644 (file)
-Clazz.declarePackage ("java.awt.geom");\r
-Clazz.load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {\r
-c$ = Clazz.declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, java.awt.geom.Rectangle2D, []);\r
-});\r
-Clazz.defineMethod (c$, "setRect", \r
-function (r) {\r
-this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "intersectsLine", \r
-function (x1, y1, x2, y2) {\r
-var out1;\r
-var out2;\r
-if ((out2 = this.outcode (x2, y2)) == 0) {\r
-return true;\r
-}while ((out1 = this.outcode (x1, y1)) != 0) {\r
-if ((out1 & out2) != 0) {\r
-return false;\r
-}if ((out1 & (5)) != 0) {\r
-var x = this.getX ();\r
-if ((out1 & 4) != 0) {\r
-x += this.getWidth ();\r
-}y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);\r
-x1 = x;\r
-} else {\r
-var y = this.getY ();\r
-if ((out1 & 8) != 0) {\r
-y += this.getHeight ();\r
-}x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);\r
-y1 = y;\r
-}}\r
-return true;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "intersectsLine", \r
-function (l) {\r
-return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());\r
-}, "java.awt.geom.Line2D");\r
-Clazz.defineMethod (c$, "outcode", \r
-function (p) {\r
-return this.outcode (p.getX (), p.getY ());\r
-}, "java.awt.geom.Point2D");\r
-Clazz.defineMethod (c$, "setFrame", \r
-function (x, y, w, h) {\r
-this.setRect (x, y, w, h);\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return this.clone ();\r
-});\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y) {\r
-var x0 = this.getX ();\r
-var y0 = this.getY ();\r
-return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "intersects", \r
-function (x, y, w, h) {\r
-if (this.isEmpty () || w <= 0 || h <= 0) {\r
-return false;\r
-}var x0 = this.getX ();\r
-var y0 = this.getY ();\r
-return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y, w, h) {\r
-if (this.isEmpty () || w <= 0 || h <= 0) {\r
-return false;\r
-}var x0 = this.getX ();\r
-var y0 = this.getY ();\r
-return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());\r
-}, "~N,~N,~N,~N");\r
-c$.intersect = Clazz.defineMethod (c$, "intersect", \r
-function (src1, src2, dest) {\r
-var x1 = Math.max (src1.getMinX (), src2.getMinX ());\r
-var y1 = Math.max (src1.getMinY (), src2.getMinY ());\r
-var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());\r
-var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());\r
-dest.setFrame (x1, y1, x2 - x1, y2 - y1);\r
-}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");\r
-c$.union = Clazz.defineMethod (c$, "union", \r
-function (src1, src2, dest) {\r
-var x1 = Math.min (src1.getMinX (), src2.getMinX ());\r
-var y1 = Math.min (src1.getMinY (), src2.getMinY ());\r
-var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());\r
-var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());\r
-dest.setFrameFromDiagonal (x1, y1, x2, y2);\r
-}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "add", \r
-function (newx, newy) {\r
-var x1 = Math.min (this.getMinX (), newx);\r
-var x2 = Math.max (this.getMaxX (), newx);\r
-var y1 = Math.min (this.getMinY (), newy);\r
-var y2 = Math.max (this.getMaxY (), newy);\r
-this.setRect (x1, y1, x2 - x1, y2 - y1);\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "add", \r
-function (pt) {\r
-this.add (pt.getX (), pt.getY ());\r
-}, "java.awt.geom.Point2D");\r
-Clazz.defineMethod (c$, "add", \r
-function (r) {\r
-var x1 = Math.min (this.getMinX (), r.getMinX ());\r
-var x2 = Math.max (this.getMaxX (), r.getMaxX ());\r
-var y1 = Math.min (this.getMinY (), r.getMinY ());\r
-var y2 = Math.max (this.getMaxY (), r.getMaxY ());\r
-this.setRect (x1, y1, x2 - x1, y2 - y1);\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "getPathIterator", \r
-function (at) {\r
-return  new java.awt.geom.RectIterator (this, at);\r
-}, "java.awt.geom.AffineTransform");\r
-Clazz.defineMethod (c$, "getPathIterator", \r
-function (at, flatness) {\r
-return  new java.awt.geom.RectIterator (this, at);\r
-}, "java.awt.geom.AffineTransform,~N");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-var bits = java.lang.Double.doubleToLongBits (this.getX ());\r
-bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;\r
-bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;\r
-bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;\r
-return ((bits) ^ ((bits >> 32)));\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (obj) {\r
-if (obj === this) {\r
-return true;\r
-}if (Clazz.instanceOf (obj, java.awt.geom.Rectangle2D)) {\r
-var r2d = obj;\r
-return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));\r
-}return false;\r
-}, "~O");\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.x = 0;\r
-this.y = 0;\r
-this.width = 0;\r
-this.height = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Float, []);\r
-{\r
-if (arguments.length == 0)\r
-return;\r
-}this.setRect (a, b, c, d);\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "getX", \r
-function () {\r
-return this.x;\r
-});\r
-Clazz.defineMethod (c$, "getY", \r
-function () {\r
-return this.y;\r
-});\r
-Clazz.defineMethod (c$, "getWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.defineMethod (c$, "getHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.overrideMethod (c$, "isEmpty", \r
-function () {\r
-return (this.width <= 0.0) || (this.height <= 0.0);\r
-});\r
-Clazz.defineMethod (c$, "setRect", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setRect", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setRect", \r
-function (a) {\r
-this.x = a.getX ();\r
-this.y = a.getY ();\r
-this.width = a.getWidth ();\r
-this.height = a.getHeight ();\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "outcode", \r
-function (a, b) {\r
-var c = 0;\r
-if (this.width <= 0) {\r
-c |= 5;\r
-} else if (a < this.x) {\r
-c |= 1;\r
-} else if (a > this.x + this.width) {\r
-c |= 4;\r
-}if (this.height <= 0) {\r
-c |= 10;\r
-} else if (b < this.y) {\r
-c |= 2;\r
-} else if (b > this.y + this.height) {\r
-c |= 8;\r
-}return c;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);\r
-});\r
-Clazz.overrideMethod (c$, "createIntersection", \r
-function (a) {\r
-var b;\r
-if (Clazz.instanceOf (a, java.awt.geom.Rectangle2D.Float)) {\r
-b =  new java.awt.geom.Rectangle2D.Float ();\r
-} else {\r
-b =  new java.awt.geom.Rectangle2D.Double ();\r
-}java.awt.geom.Rectangle2D.intersect (this, a, b);\r
-return b;\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.overrideMethod (c$, "createUnion", \r
-function (a) {\r
-var b;\r
-if (Clazz.instanceOf (a, java.awt.geom.Rectangle2D.Float)) {\r
-b =  new java.awt.geom.Rectangle2D.Float ();\r
-} else {\r
-b =  new java.awt.geom.Rectangle2D.Double ();\r
-}java.awt.geom.Rectangle2D.union (this, a, b);\r
-return b;\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";\r
-});\r
-c$ = Clazz.p0p ();\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.x = 0;\r
-this.y = 0;\r
-this.width = 0;\r
-this.height = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Double, []);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Double, []);\r
-this.setRect (a, b, c, d);\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "getX", \r
-function () {\r
-return this.x;\r
-});\r
-Clazz.defineMethod (c$, "getY", \r
-function () {\r
-return this.y;\r
-});\r
-Clazz.defineMethod (c$, "getWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.defineMethod (c$, "getHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.overrideMethod (c$, "isEmpty", \r
-function () {\r
-return (this.width <= 0.0) || (this.height <= 0.0);\r
-});\r
-Clazz.defineMethod (c$, "setRect", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setRect", \r
-function (a) {\r
-this.x = a.getX ();\r
-this.y = a.getY ();\r
-this.width = a.getWidth ();\r
-this.height = a.getHeight ();\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "outcode", \r
-function (a, b) {\r
-var c = 0;\r
-if (this.width <= 0) {\r
-c |= 5;\r
-} else if (a < this.x) {\r
-c |= 1;\r
-} else if (a > this.x + this.width) {\r
-c |= 4;\r
-}if (this.height <= 0) {\r
-c |= 10;\r
-} else if (b < this.y) {\r
-c |= 2;\r
-} else if (b > this.y + this.height) {\r
-c |= 8;\r
-}return c;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);\r
-});\r
-Clazz.overrideMethod (c$, "createIntersection", \r
-function (a) {\r
-var b =  new java.awt.geom.Rectangle2D.Double ();\r
-java.awt.geom.Rectangle2D.intersect (this, a, b);\r
-return b;\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.overrideMethod (c$, "createUnion", \r
-function (a) {\r
-var b =  new java.awt.geom.Rectangle2D.Double ();\r
-java.awt.geom.Rectangle2D.union (this, a, b);\r
-return b;\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";\r
-});\r
-c$ = Clazz.p0p ();\r
-Clazz.defineStatics (c$,\r
-"OUT_LEFT", 1,\r
-"OUT_TOP", 2,\r
-"OUT_RIGHT", 4,\r
-"OUT_BOTTOM", 8);\r
-});\r
+Clazz.declarePackage ("java.awt.geom");
+Clazz.load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
+c$ = Clazz.declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, java.awt.geom.Rectangle2D, []);
+});
+Clazz.defineMethod (c$, "setRect", 
+function (r) {
+this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "intersectsLine", 
+function (x1, y1, x2, y2) {
+var out1;
+var out2;
+if ((out2 = this.outcode (x2, y2)) == 0) {
+return true;
+}while ((out1 = this.outcode (x1, y1)) != 0) {
+if ((out1 & out2) != 0) {
+return false;
+}if ((out1 & (5)) != 0) {
+var x = this.getX ();
+if ((out1 & 4) != 0) {
+x += this.getWidth ();
+}y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
+x1 = x;
+} else {
+var y = this.getY ();
+if ((out1 & 8) != 0) {
+y += this.getHeight ();
+}x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
+y1 = y;
+}}
+return true;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "intersectsLine", 
+function (l) {
+return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
+}, "java.awt.geom.Line2D");
+Clazz.defineMethod (c$, "outcode", 
+function (p) {
+return this.outcode (p.getX (), p.getY ());
+}, "java.awt.geom.Point2D");
+Clazz.defineMethod (c$, "setFrame", 
+function (x, y, w, h) {
+this.setRect (x, y, w, h);
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return this.clone ();
+});
+Clazz.defineMethod (c$, "contains", 
+function (x, y) {
+var x0 = this.getX ();
+var y0 = this.getY ();
+return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
+}, "~N,~N");
+Clazz.defineMethod (c$, "intersects", 
+function (x, y, w, h) {
+if (this.isEmpty () || w <= 0 || h <= 0) {
+return false;
+}var x0 = this.getX ();
+var y0 = this.getY ();
+return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "contains", 
+function (x, y, w, h) {
+if (this.isEmpty () || w <= 0 || h <= 0) {
+return false;
+}var x0 = this.getX ();
+var y0 = this.getY ();
+return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
+}, "~N,~N,~N,~N");
+c$.intersect = Clazz.defineMethod (c$, "intersect", 
+function (src1, src2, dest) {
+var x1 = Math.max (src1.getMinX (), src2.getMinX ());
+var y1 = Math.max (src1.getMinY (), src2.getMinY ());
+var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
+var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
+dest.setFrame (x1, y1, x2 - x1, y2 - y1);
+}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
+c$.union = Clazz.defineMethod (c$, "union", 
+function (src1, src2, dest) {
+var x1 = Math.min (src1.getMinX (), src2.getMinX ());
+var y1 = Math.min (src1.getMinY (), src2.getMinY ());
+var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
+var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
+dest.setFrameFromDiagonal (x1, y1, x2, y2);
+}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "add", 
+function (newx, newy) {
+var x1 = Math.min (this.getMinX (), newx);
+var x2 = Math.max (this.getMaxX (), newx);
+var y1 = Math.min (this.getMinY (), newy);
+var y2 = Math.max (this.getMaxY (), newy);
+this.setRect (x1, y1, x2 - x1, y2 - y1);
+}, "~N,~N");
+Clazz.defineMethod (c$, "add", 
+function (pt) {
+this.add (pt.getX (), pt.getY ());
+}, "java.awt.geom.Point2D");
+Clazz.defineMethod (c$, "add", 
+function (r) {
+var x1 = Math.min (this.getMinX (), r.getMinX ());
+var x2 = Math.max (this.getMaxX (), r.getMaxX ());
+var y1 = Math.min (this.getMinY (), r.getMinY ());
+var y2 = Math.max (this.getMaxY (), r.getMaxY ());
+this.setRect (x1, y1, x2 - x1, y2 - y1);
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "getPathIterator", 
+function (at) {
+return  new java.awt.geom.RectIterator (this, at);
+}, "java.awt.geom.AffineTransform");
+Clazz.defineMethod (c$, "getPathIterator", 
+function (at, flatness) {
+return  new java.awt.geom.RectIterator (this, at);
+}, "java.awt.geom.AffineTransform,~N");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+var bits = java.lang.Double.doubleToLongBits (this.getX ());
+bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
+bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
+bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
+return ((bits) ^ ((bits >> 32)));
+});
+Clazz.overrideMethod (c$, "equals", 
+function (obj) {
+if (obj === this) {
+return true;
+}if (Clazz.instanceOf (obj, java.awt.geom.Rectangle2D)) {
+var r2d = obj;
+return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
+}return false;
+}, "~O");
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.x = 0;
+this.y = 0;
+this.width = 0;
+this.height = 0;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
+{
+if (arguments.length == 0)
+return;
+}this.setRect (a, b, c, d);
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "getX", 
+function () {
+return this.x;
+});
+Clazz.defineMethod (c$, "getY", 
+function () {
+return this.y;
+});
+Clazz.defineMethod (c$, "getWidth", 
+function () {
+return this.width;
+});
+Clazz.defineMethod (c$, "getHeight", 
+function () {
+return this.height;
+});
+Clazz.overrideMethod (c$, "isEmpty", 
+function () {
+return (this.width <= 0.0) || (this.height <= 0.0);
+});
+Clazz.defineMethod (c$, "setRect", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setRect", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setRect", 
+function (a) {
+this.x = a.getX ();
+this.y = a.getY ();
+this.width = a.getWidth ();
+this.height = a.getHeight ();
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "outcode", 
+function (a, b) {
+var c = 0;
+if (this.width <= 0) {
+c |= 5;
+} else if (a < this.x) {
+c |= 1;
+} else if (a > this.x + this.width) {
+c |= 4;
+}if (this.height <= 0) {
+c |= 10;
+} else if (b < this.y) {
+c |= 2;
+} else if (b > this.y + this.height) {
+c |= 8;
+}return c;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
+});
+Clazz.overrideMethod (c$, "createIntersection", 
+function (a) {
+var b;
+if (Clazz.instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
+b =  new java.awt.geom.Rectangle2D.Float ();
+} else {
+b =  new java.awt.geom.Rectangle2D.Double ();
+}java.awt.geom.Rectangle2D.intersect (this, a, b);
+return b;
+}, "java.awt.geom.Rectangle2D");
+Clazz.overrideMethod (c$, "createUnion", 
+function (a) {
+var b;
+if (Clazz.instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
+b =  new java.awt.geom.Rectangle2D.Float ();
+} else {
+b =  new java.awt.geom.Rectangle2D.Double ();
+}java.awt.geom.Rectangle2D.union (this, a, b);
+return b;
+}, "java.awt.geom.Rectangle2D");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
+});
+c$ = Clazz.p0p ();
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.x = 0;
+this.y = 0;
+this.width = 0;
+this.height = 0;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
+});
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
+this.setRect (a, b, c, d);
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "getX", 
+function () {
+return this.x;
+});
+Clazz.defineMethod (c$, "getY", 
+function () {
+return this.y;
+});
+Clazz.defineMethod (c$, "getWidth", 
+function () {
+return this.width;
+});
+Clazz.defineMethod (c$, "getHeight", 
+function () {
+return this.height;
+});
+Clazz.overrideMethod (c$, "isEmpty", 
+function () {
+return (this.width <= 0.0) || (this.height <= 0.0);
+});
+Clazz.defineMethod (c$, "setRect", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setRect", 
+function (a) {
+this.x = a.getX ();
+this.y = a.getY ();
+this.width = a.getWidth ();
+this.height = a.getHeight ();
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "outcode", 
+function (a, b) {
+var c = 0;
+if (this.width <= 0) {
+c |= 5;
+} else if (a < this.x) {
+c |= 1;
+} else if (a > this.x + this.width) {
+c |= 4;
+}if (this.height <= 0) {
+c |= 10;
+} else if (b < this.y) {
+c |= 2;
+} else if (b > this.y + this.height) {
+c |= 8;
+}return c;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
+});
+Clazz.overrideMethod (c$, "createIntersection", 
+function (a) {
+var b =  new java.awt.geom.Rectangle2D.Double ();
+java.awt.geom.Rectangle2D.intersect (this, a, b);
+return b;
+}, "java.awt.geom.Rectangle2D");
+Clazz.overrideMethod (c$, "createUnion", 
+function (a) {
+var b =  new java.awt.geom.Rectangle2D.Double ();
+java.awt.geom.Rectangle2D.union (this, a, b);
+return b;
+}, "java.awt.geom.Rectangle2D");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
+});
+c$ = Clazz.p0p ();
+Clazz.defineStatics (c$,
+"OUT_LEFT", 1,
+"OUT_TOP", 2,
+"OUT_RIGHT", 4,
+"OUT_BOTTOM", 8);
+});