Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / geom / Area.js
index 47efaf2..8b43924 100644 (file)
-Clazz.declarePackage ("java.awt.geom");\r
-Clazz.load (["java.awt.Shape", "java.awt.geom.PathIterator", "java.util.Vector"], ["java.awt.geom.Area", "$.AreaIterator"], ["java.lang.NullPointerException", "java.util.NoSuchElementException", "java.awt.geom.FlatteningPathIterator", "$.Rectangle2D", "jssun.awt.geom.AreaOp", "$.Crossings", "$.Curve"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.curves = null;\r
-this.cachedBounds = null;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom, "Area", null, [java.awt.Shape, Cloneable]);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.curves = java.awt.geom.Area.EmptyCurves;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (s) {\r
-if (Clazz.instanceOf (s, java.awt.geom.Area)) {\r
-this.curves = (s).curves;\r
-} else {\r
-this.curves = java.awt.geom.Area.pathToCurves (s.getPathIterator (null));\r
-}}, "java.awt.Shape");\r
-c$.pathToCurves = Clazz.defineMethod (c$, "pathToCurves", \r
- function (pi) {\r
-var curves =  new java.util.Vector ();\r
-var windingRule = pi.getWindingRule ();\r
-var coords =  Clazz.newDoubleArray (23, 0);\r
-var movx = 0;\r
-var movy = 0;\r
-var curx = 0;\r
-var cury = 0;\r
-var newx;\r
-var newy;\r
-while (!pi.isDone ()) {\r
-switch (pi.currentSegment (coords)) {\r
-case 0:\r
-jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);\r
-curx = movx = coords[0];\r
-cury = movy = coords[1];\r
-jssun.awt.geom.Curve.insertMove (curves, movx, movy);\r
-break;\r
-case 1:\r
-newx = coords[0];\r
-newy = coords[1];\r
-jssun.awt.geom.Curve.insertLine (curves, curx, cury, newx, newy);\r
-curx = newx;\r
-cury = newy;\r
-break;\r
-case 2:\r
-newx = coords[2];\r
-newy = coords[3];\r
-jssun.awt.geom.Curve.insertQuad (curves, curx, cury, coords);\r
-curx = newx;\r
-cury = newy;\r
-break;\r
-case 3:\r
-newx = coords[4];\r
-newy = coords[5];\r
-jssun.awt.geom.Curve.insertCubic (curves, curx, cury, coords);\r
-curx = newx;\r
-cury = newy;\r
-break;\r
-case 4:\r
-jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);\r
-curx = movx;\r
-cury = movy;\r
-break;\r
-}\r
-pi.next ();\r
-}\r
-jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);\r
-var operator;\r
-if (windingRule == 0) {\r
-operator =  new jssun.awt.geom.AreaOp.EOWindOp ();\r
-} else {\r
-operator =  new jssun.awt.geom.AreaOp.NZWindOp ();\r
-}return operator.calculate (curves, java.awt.geom.Area.EmptyCurves);\r
-}, "java.awt.geom.PathIterator");\r
-Clazz.defineMethod (c$, "add", \r
-function (rhs) {\r
-this.curves =  new jssun.awt.geom.AreaOp.AddOp ().calculate (this.curves, rhs.curves);\r
-this.invalidateBounds ();\r
-}, "java.awt.geom.Area");\r
-Clazz.defineMethod (c$, "subtract", \r
-function (rhs) {\r
-this.curves =  new jssun.awt.geom.AreaOp.SubOp ().calculate (this.curves, rhs.curves);\r
-this.invalidateBounds ();\r
-}, "java.awt.geom.Area");\r
-Clazz.defineMethod (c$, "intersect", \r
-function (rhs) {\r
-this.curves =  new jssun.awt.geom.AreaOp.IntOp ().calculate (this.curves, rhs.curves);\r
-this.invalidateBounds ();\r
-}, "java.awt.geom.Area");\r
-Clazz.defineMethod (c$, "exclusiveOr", \r
-function (rhs) {\r
-this.curves =  new jssun.awt.geom.AreaOp.XorOp ().calculate (this.curves, rhs.curves);\r
-this.invalidateBounds ();\r
-}, "java.awt.geom.Area");\r
-Clazz.defineMethod (c$, "reset", \r
-function () {\r
-this.curves =  new java.util.Vector ();\r
-this.invalidateBounds ();\r
-});\r
-Clazz.defineMethod (c$, "isEmpty", \r
-function () {\r
-return (this.curves.size () == 0);\r
-});\r
-Clazz.defineMethod (c$, "isPolygonal", \r
-function () {\r
-var enum_ = this.curves.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-if ((enum_.nextElement ()).getOrder () > 1) {\r
-return false;\r
-}}\r
-return true;\r
-});\r
-Clazz.defineMethod (c$, "isRectangular", \r
-function () {\r
-var size = this.curves.size ();\r
-if (size == 0) {\r
-return true;\r
-}if (size > 3) {\r
-return false;\r
-}var c1 = this.curves.get (1);\r
-var c2 = this.curves.get (2);\r
-if (c1.getOrder () != 1 || c2.getOrder () != 1) {\r
-return false;\r
-}if (c1.getXTop () != c1.getXBot () || c2.getXTop () != c2.getXBot ()) {\r
-return false;\r
-}if (c1.getYTop () != c2.getYTop () || c1.getYBot () != c2.getYBot ()) {\r
-return false;\r
-}return true;\r
-});\r
-Clazz.defineMethod (c$, "isSingular", \r
-function () {\r
-if (this.curves.size () < 3) {\r
-return true;\r
-}var enum_ = this.curves.elements ();\r
-enum_.nextElement ();\r
-while (enum_.hasMoreElements ()) {\r
-if ((enum_.nextElement ()).getOrder () == 0) {\r
-return false;\r
-}}\r
-return true;\r
-});\r
-Clazz.defineMethod (c$, "invalidateBounds", \r
- function () {\r
-this.cachedBounds = null;\r
-});\r
-Clazz.defineMethod (c$, "getCachedBounds", \r
- function () {\r
-if (this.cachedBounds != null) {\r
-return this.cachedBounds;\r
-}var r =  new java.awt.geom.Rectangle2D.Double ();\r
-if (this.curves.size () > 0) {\r
-var c = this.curves.get (0);\r
-r.setRect (c.getX0 (), c.getY0 (), 0, 0);\r
-for (var i = 1; i < this.curves.size (); i++) {\r
-(this.curves.get (i)).enlarge (r);\r
-}\r
-}return (this.cachedBounds = r);\r
-});\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return this.getCachedBounds ().getBounds2D ();\r
-});\r
-Clazz.overrideMethod (c$, "getBounds", \r
-function () {\r
-return this.getCachedBounds ().getBounds ();\r
-});\r
-Clazz.overrideMethod (c$, "clone", \r
-function () {\r
-return  new java.awt.geom.Area (this);\r
-});\r
-Clazz.defineMethod (c$, "equals", \r
-function (other) {\r
-if (other === this) {\r
-return true;\r
-}if (other == null) {\r
-return false;\r
-}var c =  new jssun.awt.geom.AreaOp.XorOp ().calculate (this.curves, other.curves);\r
-return c.isEmpty ();\r
-}, "java.awt.geom.Area");\r
-Clazz.defineMethod (c$, "transform", \r
-function (t) {\r
-if (t == null) {\r
-throw  new NullPointerException ("transform must not be null");\r
-}this.curves = java.awt.geom.Area.pathToCurves (this.getPathIterator (t));\r
-this.invalidateBounds ();\r
-}, "java.awt.geom.AffineTransform");\r
-Clazz.defineMethod (c$, "createTransformedArea", \r
-function (t) {\r
-var a =  new java.awt.geom.Area (this);\r
-a.transform (t);\r
-return a;\r
-}, "java.awt.geom.AffineTransform");\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y) {\r
-if (!this.getCachedBounds ().contains (x, y)) {\r
-return false;\r
-}var enum_ = this.curves.elements ();\r
-var crossings = 0;\r
-while (enum_.hasMoreElements ()) {\r
-var c = enum_.nextElement ();\r
-crossings += c.crossingsFor (x, y);\r
-}\r
-return ((crossings & 1) == 1);\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "contains", \r
-function (p) {\r
-return this.contains (p.getX (), p.getY ());\r
-}, "java.awt.geom.Point2D");\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y, w, h) {\r
-if (w < 0 || h < 0) {\r
-return false;\r
-}if (!this.getCachedBounds ().contains (x, y, w, h)) {\r
-return false;\r
-}var c = jssun.awt.geom.Crossings.findCrossings (this.curves, x, y, x + w, y + h);\r
-return (c != null && c.covers (y, y + h));\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "contains", \r
-function (r) {\r
-return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "intersects", \r
-function (x, y, w, h) {\r
-if (w < 0 || h < 0) {\r
-return false;\r
-}if (!this.getCachedBounds ().intersects (x, y, w, h)) {\r
-return false;\r
-}var c = jssun.awt.geom.Crossings.findCrossings (this.curves, x, y, x + w, y + h);\r
-return (c == null || !c.isEmpty ());\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "intersects", \r
-function (r) {\r
-return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "getPathIterator", \r
-function (at) {\r
-return  new java.awt.geom.AreaIterator (this.curves, at);\r
-}, "java.awt.geom.AffineTransform");\r
-Clazz.defineMethod (c$, "getPathIterator", \r
-function (at, flatness) {\r
-return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);\r
-}, "java.awt.geom.AffineTransform,~N");\r
-c$.EmptyCurves = c$.prototype.EmptyCurves =  new java.util.Vector ();\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.transform = null;\r
-this.curves = null;\r
-this.index = 0;\r
-this.prevcurve = null;\r
-this.thiscurve = null;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom, "AreaIterator", null, java.awt.geom.PathIterator);\r
-Clazz.makeConstructor (c$, \r
-function (curves, at) {\r
-this.curves = curves;\r
-this.transform = at;\r
-if (curves.size () >= 1) {\r
-this.thiscurve = curves.get (0);\r
-}}, "java.util.Vector,java.awt.geom.AffineTransform");\r
-Clazz.overrideMethod (c$, "getWindingRule", \r
-function () {\r
-return 1;\r
-});\r
-Clazz.overrideMethod (c$, "isDone", \r
-function () {\r
-return (this.prevcurve == null && this.thiscurve == null);\r
-});\r
-Clazz.overrideMethod (c$, "next", \r
-function () {\r
-if (this.prevcurve != null) {\r
-this.prevcurve = null;\r
-} else {\r
-this.prevcurve = this.thiscurve;\r
-this.index++;\r
-if (this.index < this.curves.size ()) {\r
-this.thiscurve = this.curves.get (this.index);\r
-if (this.thiscurve.getOrder () != 0 && this.prevcurve.getX1 () == this.thiscurve.getX0 () && this.prevcurve.getY1 () == this.thiscurve.getY0 ()) {\r
-this.prevcurve = null;\r
-}} else {\r
-this.thiscurve = null;\r
-}}});\r
-Clazz.defineMethod (c$, "currentSegment", \r
-function (coords) {\r
-var dcoords =  Clazz.newDoubleArray (6, 0);\r
-var segtype = this.currentSegment (dcoords);\r
-var numpoints = (segtype == 4 ? 0 : (segtype == 2 ? 2 : (segtype == 3 ? 3 : 1)));\r
-for (var i = 0; i < numpoints * 2; i++) {\r
-coords[i] = dcoords[i];\r
-}\r
-return segtype;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "currentSegment", \r
-function (coords) {\r
-var segtype;\r
-var numpoints;\r
-if (this.prevcurve != null) {\r
-if (this.thiscurve == null || this.thiscurve.getOrder () == 0) {\r
-return 4;\r
-}coords[0] = this.thiscurve.getX0 ();\r
-coords[1] = this.thiscurve.getY0 ();\r
-segtype = 1;\r
-numpoints = 1;\r
-} else if (this.thiscurve == null) {\r
-throw  new java.util.NoSuchElementException ("area iterator out of bounds");\r
-} else {\r
-segtype = this.thiscurve.getSegment (coords);\r
-numpoints = this.thiscurve.getOrder ();\r
-if (numpoints == 0) {\r
-numpoints = 1;\r
-}}if (this.transform != null) {\r
-this.transform.transform (coords, 0, coords, 0, numpoints);\r
-}return segtype;\r
-}, "~A");\r
-});\r
+Clazz.declarePackage ("java.awt.geom");
+Clazz.load (["java.awt.Shape", "java.awt.geom.PathIterator", "java.util.Vector"], ["java.awt.geom.Area", "$.AreaIterator"], ["java.lang.NullPointerException", "java.util.NoSuchElementException", "java.awt.geom.FlatteningPathIterator", "$.Rectangle2D", "jssun.awt.geom.AreaOp", "$.Crossings", "$.Curve"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.curves = null;
+this.cachedBounds = null;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom, "Area", null, [java.awt.Shape, Cloneable]);
+Clazz.makeConstructor (c$, 
+function () {
+this.curves = java.awt.geom.Area.EmptyCurves;
+});
+Clazz.makeConstructor (c$, 
+function (s) {
+if (Clazz.instanceOf (s, java.awt.geom.Area)) {
+this.curves = (s).curves;
+} else {
+this.curves = java.awt.geom.Area.pathToCurves (s.getPathIterator (null));
+}}, "java.awt.Shape");
+c$.pathToCurves = Clazz.defineMethod (c$, "pathToCurves", 
+ function (pi) {
+var curves =  new java.util.Vector ();
+var windingRule = pi.getWindingRule ();
+var coords =  Clazz.newDoubleArray (23, 0);
+var movx = 0;
+var movy = 0;
+var curx = 0;
+var cury = 0;
+var newx;
+var newy;
+while (!pi.isDone ()) {
+switch (pi.currentSegment (coords)) {
+case 0:
+jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);
+curx = movx = coords[0];
+cury = movy = coords[1];
+jssun.awt.geom.Curve.insertMove (curves, movx, movy);
+break;
+case 1:
+newx = coords[0];
+newy = coords[1];
+jssun.awt.geom.Curve.insertLine (curves, curx, cury, newx, newy);
+curx = newx;
+cury = newy;
+break;
+case 2:
+newx = coords[2];
+newy = coords[3];
+jssun.awt.geom.Curve.insertQuad (curves, curx, cury, coords);
+curx = newx;
+cury = newy;
+break;
+case 3:
+newx = coords[4];
+newy = coords[5];
+jssun.awt.geom.Curve.insertCubic (curves, curx, cury, coords);
+curx = newx;
+cury = newy;
+break;
+case 4:
+jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);
+curx = movx;
+cury = movy;
+break;
+}
+pi.next ();
+}
+jssun.awt.geom.Curve.insertLine (curves, curx, cury, movx, movy);
+var operator;
+if (windingRule == 0) {
+operator =  new jssun.awt.geom.AreaOp.EOWindOp ();
+} else {
+operator =  new jssun.awt.geom.AreaOp.NZWindOp ();
+}return operator.calculate (curves, java.awt.geom.Area.EmptyCurves);
+}, "java.awt.geom.PathIterator");
+Clazz.defineMethod (c$, "add", 
+function (rhs) {
+this.curves =  new jssun.awt.geom.AreaOp.AddOp ().calculate (this.curves, rhs.curves);
+this.invalidateBounds ();
+}, "java.awt.geom.Area");
+Clazz.defineMethod (c$, "subtract", 
+function (rhs) {
+this.curves =  new jssun.awt.geom.AreaOp.SubOp ().calculate (this.curves, rhs.curves);
+this.invalidateBounds ();
+}, "java.awt.geom.Area");
+Clazz.defineMethod (c$, "intersect", 
+function (rhs) {
+this.curves =  new jssun.awt.geom.AreaOp.IntOp ().calculate (this.curves, rhs.curves);
+this.invalidateBounds ();
+}, "java.awt.geom.Area");
+Clazz.defineMethod (c$, "exclusiveOr", 
+function (rhs) {
+this.curves =  new jssun.awt.geom.AreaOp.XorOp ().calculate (this.curves, rhs.curves);
+this.invalidateBounds ();
+}, "java.awt.geom.Area");
+Clazz.defineMethod (c$, "reset", 
+function () {
+this.curves =  new java.util.Vector ();
+this.invalidateBounds ();
+});
+Clazz.defineMethod (c$, "isEmpty", 
+function () {
+return (this.curves.size () == 0);
+});
+Clazz.defineMethod (c$, "isPolygonal", 
+function () {
+var enum_ = this.curves.elements ();
+while (enum_.hasMoreElements ()) {
+if ((enum_.nextElement ()).getOrder () > 1) {
+return false;
+}}
+return true;
+});
+Clazz.defineMethod (c$, "isRectangular", 
+function () {
+var size = this.curves.size ();
+if (size == 0) {
+return true;
+}if (size > 3) {
+return false;
+}var c1 = this.curves.get (1);
+var c2 = this.curves.get (2);
+if (c1.getOrder () != 1 || c2.getOrder () != 1) {
+return false;
+}if (c1.getXTop () != c1.getXBot () || c2.getXTop () != c2.getXBot ()) {
+return false;
+}if (c1.getYTop () != c2.getYTop () || c1.getYBot () != c2.getYBot ()) {
+return false;
+}return true;
+});
+Clazz.defineMethod (c$, "isSingular", 
+function () {
+if (this.curves.size () < 3) {
+return true;
+}var enum_ = this.curves.elements ();
+enum_.nextElement ();
+while (enum_.hasMoreElements ()) {
+if ((enum_.nextElement ()).getOrder () == 0) {
+return false;
+}}
+return true;
+});
+Clazz.defineMethod (c$, "invalidateBounds", 
+ function () {
+this.cachedBounds = null;
+});
+Clazz.defineMethod (c$, "getCachedBounds", 
+ function () {
+if (this.cachedBounds != null) {
+return this.cachedBounds;
+}var r =  new java.awt.geom.Rectangle2D.Double ();
+if (this.curves.size () > 0) {
+var c = this.curves.get (0);
+r.setRect (c.getX0 (), c.getY0 (), 0, 0);
+for (var i = 1; i < this.curves.size (); i++) {
+(this.curves.get (i)).enlarge (r);
+}
+}return (this.cachedBounds = r);
+});
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return this.getCachedBounds ().getBounds2D ();
+});
+Clazz.overrideMethod (c$, "getBounds", 
+function () {
+return this.getCachedBounds ().getBounds ();
+});
+Clazz.overrideMethod (c$, "clone", 
+function () {
+return  new java.awt.geom.Area (this);
+});
+Clazz.defineMethod (c$, "equals", 
+function (other) {
+if (other === this) {
+return true;
+}if (other == null) {
+return false;
+}var c =  new jssun.awt.geom.AreaOp.XorOp ().calculate (this.curves, other.curves);
+return c.isEmpty ();
+}, "java.awt.geom.Area");
+Clazz.defineMethod (c$, "transform", 
+function (t) {
+if (t == null) {
+throw  new NullPointerException ("transform must not be null");
+}this.curves = java.awt.geom.Area.pathToCurves (this.getPathIterator (t));
+this.invalidateBounds ();
+}, "java.awt.geom.AffineTransform");
+Clazz.defineMethod (c$, "createTransformedArea", 
+function (t) {
+var a =  new java.awt.geom.Area (this);
+a.transform (t);
+return a;
+}, "java.awt.geom.AffineTransform");
+Clazz.defineMethod (c$, "contains", 
+function (x, y) {
+if (!this.getCachedBounds ().contains (x, y)) {
+return false;
+}var enum_ = this.curves.elements ();
+var crossings = 0;
+while (enum_.hasMoreElements ()) {
+var c = enum_.nextElement ();
+crossings += c.crossingsFor (x, y);
+}
+return ((crossings & 1) == 1);
+}, "~N,~N");
+Clazz.defineMethod (c$, "contains", 
+function (p) {
+return this.contains (p.getX (), p.getY ());
+}, "java.awt.geom.Point2D");
+Clazz.defineMethod (c$, "contains", 
+function (x, y, w, h) {
+if (w < 0 || h < 0) {
+return false;
+}if (!this.getCachedBounds ().contains (x, y, w, h)) {
+return false;
+}var c = jssun.awt.geom.Crossings.findCrossings (this.curves, x, y, x + w, y + h);
+return (c != null && c.covers (y, y + h));
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "contains", 
+function (r) {
+return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "intersects", 
+function (x, y, w, h) {
+if (w < 0 || h < 0) {
+return false;
+}if (!this.getCachedBounds ().intersects (x, y, w, h)) {
+return false;
+}var c = jssun.awt.geom.Crossings.findCrossings (this.curves, x, y, x + w, y + h);
+return (c == null || !c.isEmpty ());
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "intersects", 
+function (r) {
+return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "getPathIterator", 
+function (at) {
+return  new java.awt.geom.AreaIterator (this.curves, at);
+}, "java.awt.geom.AffineTransform");
+Clazz.defineMethod (c$, "getPathIterator", 
+function (at, flatness) {
+return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
+}, "java.awt.geom.AffineTransform,~N");
+c$.EmptyCurves = c$.prototype.EmptyCurves =  new java.util.Vector ();
+c$ = Clazz.decorateAsClass (function () {
+this.transform = null;
+this.curves = null;
+this.index = 0;
+this.prevcurve = null;
+this.thiscurve = null;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom, "AreaIterator", null, java.awt.geom.PathIterator);
+Clazz.makeConstructor (c$, 
+function (curves, at) {
+this.curves = curves;
+this.transform = at;
+if (curves.size () >= 1) {
+this.thiscurve = curves.get (0);
+}}, "java.util.Vector,java.awt.geom.AffineTransform");
+Clazz.overrideMethod (c$, "getWindingRule", 
+function () {
+return 1;
+});
+Clazz.overrideMethod (c$, "isDone", 
+function () {
+return (this.prevcurve == null && this.thiscurve == null);
+});
+Clazz.overrideMethod (c$, "next", 
+function () {
+if (this.prevcurve != null) {
+this.prevcurve = null;
+} else {
+this.prevcurve = this.thiscurve;
+this.index++;
+if (this.index < this.curves.size ()) {
+this.thiscurve = this.curves.get (this.index);
+if (this.thiscurve.getOrder () != 0 && this.prevcurve.getX1 () == this.thiscurve.getX0 () && this.prevcurve.getY1 () == this.thiscurve.getY0 ()) {
+this.prevcurve = null;
+}} else {
+this.thiscurve = null;
+}}});
+Clazz.defineMethod (c$, "currentSegment", 
+function (coords) {
+var dcoords =  Clazz.newDoubleArray (6, 0);
+var segtype = this.currentSegment (dcoords);
+var numpoints = (segtype == 4 ? 0 : (segtype == 2 ? 2 : (segtype == 3 ? 3 : 1)));
+for (var i = 0; i < numpoints * 2; i++) {
+coords[i] = dcoords[i];
+}
+return segtype;
+}, "~A");
+Clazz.defineMethod (c$, "currentSegment", 
+function (coords) {
+var segtype;
+var numpoints;
+if (this.prevcurve != null) {
+if (this.thiscurve == null || this.thiscurve.getOrder () == 0) {
+return 4;
+}coords[0] = this.thiscurve.getX0 ();
+coords[1] = this.thiscurve.getY0 ();
+segtype = 1;
+numpoints = 1;
+} else if (this.thiscurve == null) {
+throw  new java.util.NoSuchElementException ("area iterator out of bounds");
+} else {
+segtype = this.thiscurve.getSegment (coords);
+numpoints = this.thiscurve.getOrder ();
+if (numpoints == 0) {
+numpoints = 1;
+}}if (this.transform != null) {
+this.transform.transform (coords, 0, coords, 0, numpoints);
+}return segtype;
+}, "~A");
+});