Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / jssun / awt / geom / Order2.js
index a250057..e1d4940 100644 (file)
-Clazz.declarePackage ("jssun.awt.geom");\r
-Clazz.load (["jssun.awt.geom.Curve"], "jssun.awt.geom.Order2", null, function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.x0 = 0;\r
-this.y0 = 0;\r
-this.cx0 = 0;\r
-this.cy0 = 0;\r
-this.x1 = 0;\r
-this.y1 = 0;\r
-this.xmin = 0;\r
-this.xmax = 0;\r
-this.xcoeff0 = 0;\r
-this.xcoeff1 = 0;\r
-this.xcoeff2 = 0;\r
-this.ycoeff0 = 0;\r
-this.ycoeff1 = 0;\r
-this.ycoeff2 = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt.geom, "Order2", jssun.awt.geom.Curve);\r
-c$.insert = Clazz.defineMethod (c$, "insert", \r
-function (curves, tmp, x0, y0, cx0, cy0, x1, y1, direction) {\r
-var numparams = jssun.awt.geom.Order2.getHorizontalParams (y0, cy0, y1, tmp);\r
-if (numparams == 0) {\r
-jssun.awt.geom.Order2.addInstance (curves, x0, y0, cx0, cy0, x1, y1, direction);\r
-return;\r
-}var t = tmp[0];\r
-tmp[0] = x0;\r
-tmp[1] = y0;\r
-tmp[2] = cx0;\r
-tmp[3] = cy0;\r
-tmp[4] = x1;\r
-tmp[5] = y1;\r
-jssun.awt.geom.Order2.split (tmp, 0, t);\r
-var i0 = (direction == 1) ? 0 : 4;\r
-var i1 = 4 - i0;\r
-jssun.awt.geom.Order2.addInstance (curves, tmp[i0], tmp[i0 + 1], tmp[i0 + 2], tmp[i0 + 3], tmp[i0 + 4], tmp[i0 + 5], direction);\r
-jssun.awt.geom.Order2.addInstance (curves, tmp[i1], tmp[i1 + 1], tmp[i1 + 2], tmp[i1 + 3], tmp[i1 + 4], tmp[i1 + 5], direction);\r
-}, "java.util.Vector,~A,~N,~N,~N,~N,~N,~N,~N");\r
-c$.addInstance = Clazz.defineMethod (c$, "addInstance", \r
-function (curves, x0, y0, cx0, cy0, x1, y1, direction) {\r
-if (y0 > y1) {\r
-curves.add ( new jssun.awt.geom.Order2 (x1, y1, cx0, cy0, x0, y0, -direction));\r
-} else if (y1 > y0) {\r
-curves.add ( new jssun.awt.geom.Order2 (x0, y0, cx0, cy0, x1, y1, direction));\r
-}}, "java.util.Vector,~N,~N,~N,~N,~N,~N,~N");\r
-c$.getHorizontalParams = Clazz.defineMethod (c$, "getHorizontalParams", \r
-function (c0, cp, c1, ret) {\r
-if (c0 <= cp && cp <= c1) {\r
-return 0;\r
-}c0 -= cp;\r
-c1 -= cp;\r
-var denom = c0 + c1;\r
-if (denom == 0) {\r
-return 0;\r
-}var t = c0 / denom;\r
-if (t <= 0 || t >= 1) {\r
-return 0;\r
-}ret[0] = t;\r
-return 1;\r
-}, "~N,~N,~N,~A");\r
-c$.split = Clazz.defineMethod (c$, "split", \r
-function (coords, pos, t) {\r
-var x0;\r
-var y0;\r
-var cx;\r
-var cy;\r
-var x1;\r
-var y1;\r
-coords[pos + 8] = x1 = coords[pos + 4];\r
-coords[pos + 9] = y1 = coords[pos + 5];\r
-cx = coords[pos + 2];\r
-cy = coords[pos + 3];\r
-x1 = cx + (x1 - cx) * t;\r
-y1 = cy + (y1 - cy) * t;\r
-x0 = coords[pos + 0];\r
-y0 = coords[pos + 1];\r
-x0 = x0 + (cx - x0) * t;\r
-y0 = y0 + (cy - y0) * t;\r
-cx = x0 + (x1 - x0) * t;\r
-cy = y0 + (y1 - y0) * t;\r
-coords[pos + 2] = x0;\r
-coords[pos + 3] = y0;\r
-coords[pos + 4] = cx;\r
-coords[pos + 5] = cy;\r
-coords[pos + 6] = x1;\r
-coords[pos + 7] = y1;\r
-}, "~A,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (x0, y0, cx0, cy0, x1, y1, direction) {\r
-Clazz.superConstructor (this, jssun.awt.geom.Order2, [direction]);\r
-if (cy0 < y0) {\r
-cy0 = y0;\r
-} else if (cy0 > y1) {\r
-cy0 = y1;\r
-}this.x0 = x0;\r
-this.y0 = y0;\r
-this.cx0 = cx0;\r
-this.cy0 = cy0;\r
-this.x1 = x1;\r
-this.y1 = y1;\r
-this.xmin = Math.min (Math.min (x0, x1), cx0);\r
-this.xmax = Math.max (Math.max (x0, x1), cx0);\r
-this.xcoeff0 = x0;\r
-this.xcoeff1 = cx0 + cx0 - x0 - x0;\r
-this.xcoeff2 = x0 - cx0 - cx0 + x1;\r
-this.ycoeff0 = y0;\r
-this.ycoeff1 = cy0 + cy0 - y0 - y0;\r
-this.ycoeff2 = y0 - cy0 - cy0 + y1;\r
-}, "~N,~N,~N,~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getOrder", \r
-function () {\r
-return 2;\r
-});\r
-Clazz.overrideMethod (c$, "getXTop", \r
-function () {\r
-return this.x0;\r
-});\r
-Clazz.overrideMethod (c$, "getYTop", \r
-function () {\r
-return this.y0;\r
-});\r
-Clazz.overrideMethod (c$, "getXBot", \r
-function () {\r
-return this.x1;\r
-});\r
-Clazz.overrideMethod (c$, "getYBot", \r
-function () {\r
-return this.y1;\r
-});\r
-Clazz.overrideMethod (c$, "getXMin", \r
-function () {\r
-return this.xmin;\r
-});\r
-Clazz.overrideMethod (c$, "getXMax", \r
-function () {\r
-return this.xmax;\r
-});\r
-Clazz.overrideMethod (c$, "getX0", \r
-function () {\r
-return (this.direction == 1) ? this.x0 : this.x1;\r
-});\r
-Clazz.overrideMethod (c$, "getY0", \r
-function () {\r
-return (this.direction == 1) ? this.y0 : this.y1;\r
-});\r
-Clazz.defineMethod (c$, "getCX0", \r
-function () {\r
-return this.cx0;\r
-});\r
-Clazz.defineMethod (c$, "getCY0", \r
-function () {\r
-return this.cy0;\r
-});\r
-Clazz.overrideMethod (c$, "getX1", \r
-function () {\r
-return (this.direction == -1) ? this.x0 : this.x1;\r
-});\r
-Clazz.overrideMethod (c$, "getY1", \r
-function () {\r
-return (this.direction == -1) ? this.y0 : this.y1;\r
-});\r
-Clazz.overrideMethod (c$, "XforY", \r
-function (y) {\r
-if (y <= this.y0) {\r
-return this.x0;\r
-}if (y >= this.y1) {\r
-return this.x1;\r
-}return this.XforT (this.TforY (y));\r
-}, "~N");\r
-Clazz.defineMethod (c$, "TforY", \r
-function (y) {\r
-if (y <= this.y0) {\r
-return 0;\r
-}if (y >= this.y1) {\r
-return 1;\r
-}return jssun.awt.geom.Order2.TforY (y, this.ycoeff0, this.ycoeff1, this.ycoeff2);\r
-}, "~N");\r
-c$.TforY = Clazz.defineMethod (c$, "TforY", \r
-function (y, ycoeff0, ycoeff1, ycoeff2) {\r
-ycoeff0 -= y;\r
-if (ycoeff2 == 0.0) {\r
-var root = -ycoeff0 / ycoeff1;\r
-if (root >= 0 && root <= 1) {\r
-return root;\r
-}} else {\r
-var d = ycoeff1 * ycoeff1 - 4.0 * ycoeff2 * ycoeff0;\r
-if (d >= 0.0) {\r
-d = Math.sqrt (d);\r
-if (ycoeff1 < 0.0) {\r
-d = -d;\r
-}var q = (ycoeff1 + d) / -2.0;\r
-var root = q / ycoeff2;\r
-if (root >= 0 && root <= 1) {\r
-return root;\r
-}if (q != 0.0) {\r
-root = ycoeff0 / q;\r
-if (root >= 0 && root <= 1) {\r
-return root;\r
-}}}}var y0 = ycoeff0;\r
-var y1 = ycoeff0 + ycoeff1 + ycoeff2;\r
-return (0 < (y0 + y1) / 2) ? 0.0 : 1.0;\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "XforT", \r
-function (t) {\r
-return (this.xcoeff2 * t + this.xcoeff1) * t + this.xcoeff0;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "YforT", \r
-function (t) {\r
-return (this.ycoeff2 * t + this.ycoeff1) * t + this.ycoeff0;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "dXforT", \r
-function (t, deriv) {\r
-switch (deriv) {\r
-case 0:\r
-return (this.xcoeff2 * t + this.xcoeff1) * t + this.xcoeff0;\r
-case 1:\r
-return 2 * this.xcoeff2 * t + this.xcoeff1;\r
-case 2:\r
-return 2 * this.xcoeff2;\r
-default:\r
-return 0;\r
-}\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "dYforT", \r
-function (t, deriv) {\r
-switch (deriv) {\r
-case 0:\r
-return (this.ycoeff2 * t + this.ycoeff1) * t + this.ycoeff0;\r
-case 1:\r
-return 2 * this.ycoeff2 * t + this.ycoeff1;\r
-case 2:\r
-return 2 * this.ycoeff2;\r
-default:\r
-return 0;\r
-}\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "nextVertical", \r
-function (t0, t1) {\r
-var t = -this.xcoeff1 / (2 * this.xcoeff2);\r
-if (t > t0 && t < t1) {\r
-return t;\r
-}return t1;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "enlarge", \r
-function (r) {\r
-r.add (this.x0, this.y0);\r
-var t = -this.xcoeff1 / (2 * this.xcoeff2);\r
-if (t > 0 && t < 1) {\r
-r.add (this.XforT (t), this.YforT (t));\r
-}r.add (this.x1, this.y1);\r
-}, "java.awt.geom.Rectangle2D");\r
-Clazz.defineMethod (c$, "getSubCurve", \r
-function (ystart, yend, dir) {\r
-var t0;\r
-var t1;\r
-if (ystart <= this.y0) {\r
-if (yend >= this.y1) {\r
-return this.getWithDirection (dir);\r
-}t0 = 0;\r
-} else {\r
-t0 = jssun.awt.geom.Order2.TforY (ystart, this.ycoeff0, this.ycoeff1, this.ycoeff2);\r
-}if (yend >= this.y1) {\r
-t1 = 1;\r
-} else {\r
-t1 = jssun.awt.geom.Order2.TforY (yend, this.ycoeff0, this.ycoeff1, this.ycoeff2);\r
-}var eqn =  Clazz.newDoubleArray (10, 0);\r
-eqn[0] = this.x0;\r
-eqn[1] = this.y0;\r
-eqn[2] = this.cx0;\r
-eqn[3] = this.cy0;\r
-eqn[4] = this.x1;\r
-eqn[5] = this.y1;\r
-if (t1 < 1) {\r
-jssun.awt.geom.Order2.split (eqn, 0, t1);\r
-}var i;\r
-if (t0 <= 0) {\r
-i = 0;\r
-} else {\r
-jssun.awt.geom.Order2.split (eqn, 0, t0 / t1);\r
-i = 4;\r
-}return  new jssun.awt.geom.Order2 (eqn[i + 0], ystart, eqn[i + 2], eqn[i + 3], eqn[i + 4], yend, dir);\r
-}, "~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getReversedCurve", \r
-function () {\r
-return  new jssun.awt.geom.Order2 (this.x0, this.y0, this.cx0, this.cy0, this.x1, this.y1, -this.direction);\r
-});\r
-Clazz.overrideMethod (c$, "getSegment", \r
-function (coords) {\r
-coords[0] = this.cx0;\r
-coords[1] = this.cy0;\r
-if (this.direction == 1) {\r
-coords[2] = this.x1;\r
-coords[3] = this.y1;\r
-} else {\r
-coords[2] = this.x0;\r
-coords[3] = this.y0;\r
-}return 2;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "controlPointString", \r
-function () {\r
-return ("(" + jssun.awt.geom.Curve.round (this.cx0) + ", " + jssun.awt.geom.Curve.round (this.cy0) + "), ");\r
-});\r
-});\r
+Clazz.declarePackage ("jssun.awt.geom");
+Clazz.load (["jssun.awt.geom.Curve"], "jssun.awt.geom.Order2", null, function () {
+c$ = Clazz.decorateAsClass (function () {
+this.x0 = 0;
+this.y0 = 0;
+this.cx0 = 0;
+this.cy0 = 0;
+this.x1 = 0;
+this.y1 = 0;
+this.xmin = 0;
+this.xmax = 0;
+this.xcoeff0 = 0;
+this.xcoeff1 = 0;
+this.xcoeff2 = 0;
+this.ycoeff0 = 0;
+this.ycoeff1 = 0;
+this.ycoeff2 = 0;
+Clazz.instantialize (this, arguments);
+}, jssun.awt.geom, "Order2", jssun.awt.geom.Curve);
+c$.insert = Clazz.defineMethod (c$, "insert", 
+function (curves, tmp, x0, y0, cx0, cy0, x1, y1, direction) {
+var numparams = jssun.awt.geom.Order2.getHorizontalParams (y0, cy0, y1, tmp);
+if (numparams == 0) {
+jssun.awt.geom.Order2.addInstance (curves, x0, y0, cx0, cy0, x1, y1, direction);
+return;
+}var t = tmp[0];
+tmp[0] = x0;
+tmp[1] = y0;
+tmp[2] = cx0;
+tmp[3] = cy0;
+tmp[4] = x1;
+tmp[5] = y1;
+jssun.awt.geom.Order2.split (tmp, 0, t);
+var i0 = (direction == 1) ? 0 : 4;
+var i1 = 4 - i0;
+jssun.awt.geom.Order2.addInstance (curves, tmp[i0], tmp[i0 + 1], tmp[i0 + 2], tmp[i0 + 3], tmp[i0 + 4], tmp[i0 + 5], direction);
+jssun.awt.geom.Order2.addInstance (curves, tmp[i1], tmp[i1 + 1], tmp[i1 + 2], tmp[i1 + 3], tmp[i1 + 4], tmp[i1 + 5], direction);
+}, "java.util.Vector,~A,~N,~N,~N,~N,~N,~N,~N");
+c$.addInstance = Clazz.defineMethod (c$, "addInstance", 
+function (curves, x0, y0, cx0, cy0, x1, y1, direction) {
+if (y0 > y1) {
+curves.add ( new jssun.awt.geom.Order2 (x1, y1, cx0, cy0, x0, y0, -direction));
+} else if (y1 > y0) {
+curves.add ( new jssun.awt.geom.Order2 (x0, y0, cx0, cy0, x1, y1, direction));
+}}, "java.util.Vector,~N,~N,~N,~N,~N,~N,~N");
+c$.getHorizontalParams = Clazz.defineMethod (c$, "getHorizontalParams", 
+function (c0, cp, c1, ret) {
+if (c0 <= cp && cp <= c1) {
+return 0;
+}c0 -= cp;
+c1 -= cp;
+var denom = c0 + c1;
+if (denom == 0) {
+return 0;
+}var t = c0 / denom;
+if (t <= 0 || t >= 1) {
+return 0;
+}ret[0] = t;
+return 1;
+}, "~N,~N,~N,~A");
+c$.split = Clazz.defineMethod (c$, "split", 
+function (coords, pos, t) {
+var x0;
+var y0;
+var cx;
+var cy;
+var x1;
+var y1;
+coords[pos + 8] = x1 = coords[pos + 4];
+coords[pos + 9] = y1 = coords[pos + 5];
+cx = coords[pos + 2];
+cy = coords[pos + 3];
+x1 = cx + (x1 - cx) * t;
+y1 = cy + (y1 - cy) * t;
+x0 = coords[pos + 0];
+y0 = coords[pos + 1];
+x0 = x0 + (cx - x0) * t;
+y0 = y0 + (cy - y0) * t;
+cx = x0 + (x1 - x0) * t;
+cy = y0 + (y1 - y0) * t;
+coords[pos + 2] = x0;
+coords[pos + 3] = y0;
+coords[pos + 4] = cx;
+coords[pos + 5] = cy;
+coords[pos + 6] = x1;
+coords[pos + 7] = y1;
+}, "~A,~N,~N");
+Clazz.makeConstructor (c$, 
+function (x0, y0, cx0, cy0, x1, y1, direction) {
+Clazz.superConstructor (this, jssun.awt.geom.Order2, [direction]);
+if (cy0 < y0) {
+cy0 = y0;
+} else if (cy0 > y1) {
+cy0 = y1;
+}this.x0 = x0;
+this.y0 = y0;
+this.cx0 = cx0;
+this.cy0 = cy0;
+this.x1 = x1;
+this.y1 = y1;
+this.xmin = Math.min (Math.min (x0, x1), cx0);
+this.xmax = Math.max (Math.max (x0, x1), cx0);
+this.xcoeff0 = x0;
+this.xcoeff1 = cx0 + cx0 - x0 - x0;
+this.xcoeff2 = x0 - cx0 - cx0 + x1;
+this.ycoeff0 = y0;
+this.ycoeff1 = cy0 + cy0 - y0 - y0;
+this.ycoeff2 = y0 - cy0 - cy0 + y1;
+}, "~N,~N,~N,~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getOrder", 
+function () {
+return 2;
+});
+Clazz.overrideMethod (c$, "getXTop", 
+function () {
+return this.x0;
+});
+Clazz.overrideMethod (c$, "getYTop", 
+function () {
+return this.y0;
+});
+Clazz.overrideMethod (c$, "getXBot", 
+function () {
+return this.x1;
+});
+Clazz.overrideMethod (c$, "getYBot", 
+function () {
+return this.y1;
+});
+Clazz.overrideMethod (c$, "getXMin", 
+function () {
+return this.xmin;
+});
+Clazz.overrideMethod (c$, "getXMax", 
+function () {
+return this.xmax;
+});
+Clazz.overrideMethod (c$, "getX0", 
+function () {
+return (this.direction == 1) ? this.x0 : this.x1;
+});
+Clazz.overrideMethod (c$, "getY0", 
+function () {
+return (this.direction == 1) ? this.y0 : this.y1;
+});
+Clazz.defineMethod (c$, "getCX0", 
+function () {
+return this.cx0;
+});
+Clazz.defineMethod (c$, "getCY0", 
+function () {
+return this.cy0;
+});
+Clazz.overrideMethod (c$, "getX1", 
+function () {
+return (this.direction == -1) ? this.x0 : this.x1;
+});
+Clazz.overrideMethod (c$, "getY1", 
+function () {
+return (this.direction == -1) ? this.y0 : this.y1;
+});
+Clazz.overrideMethod (c$, "XforY", 
+function (y) {
+if (y <= this.y0) {
+return this.x0;
+}if (y >= this.y1) {
+return this.x1;
+}return this.XforT (this.TforY (y));
+}, "~N");
+Clazz.defineMethod (c$, "TforY", 
+function (y) {
+if (y <= this.y0) {
+return 0;
+}if (y >= this.y1) {
+return 1;
+}return jssun.awt.geom.Order2.TforY (y, this.ycoeff0, this.ycoeff1, this.ycoeff2);
+}, "~N");
+c$.TforY = Clazz.defineMethod (c$, "TforY", 
+function (y, ycoeff0, ycoeff1, ycoeff2) {
+ycoeff0 -= y;
+if (ycoeff2 == 0.0) {
+var root = -ycoeff0 / ycoeff1;
+if (root >= 0 && root <= 1) {
+return root;
+}} else {
+var d = ycoeff1 * ycoeff1 - 4.0 * ycoeff2 * ycoeff0;
+if (d >= 0.0) {
+d = Math.sqrt (d);
+if (ycoeff1 < 0.0) {
+d = -d;
+}var q = (ycoeff1 + d) / -2.0;
+var root = q / ycoeff2;
+if (root >= 0 && root <= 1) {
+return root;
+}if (q != 0.0) {
+root = ycoeff0 / q;
+if (root >= 0 && root <= 1) {
+return root;
+}}}}var y0 = ycoeff0;
+var y1 = ycoeff0 + ycoeff1 + ycoeff2;
+return (0 < (y0 + y1) / 2) ? 0.0 : 1.0;
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "XforT", 
+function (t) {
+return (this.xcoeff2 * t + this.xcoeff1) * t + this.xcoeff0;
+}, "~N");
+Clazz.overrideMethod (c$, "YforT", 
+function (t) {
+return (this.ycoeff2 * t + this.ycoeff1) * t + this.ycoeff0;
+}, "~N");
+Clazz.overrideMethod (c$, "dXforT", 
+function (t, deriv) {
+switch (deriv) {
+case 0:
+return (this.xcoeff2 * t + this.xcoeff1) * t + this.xcoeff0;
+case 1:
+return 2 * this.xcoeff2 * t + this.xcoeff1;
+case 2:
+return 2 * this.xcoeff2;
+default:
+return 0;
+}
+}, "~N,~N");
+Clazz.overrideMethod (c$, "dYforT", 
+function (t, deriv) {
+switch (deriv) {
+case 0:
+return (this.ycoeff2 * t + this.ycoeff1) * t + this.ycoeff0;
+case 1:
+return 2 * this.ycoeff2 * t + this.ycoeff1;
+case 2:
+return 2 * this.ycoeff2;
+default:
+return 0;
+}
+}, "~N,~N");
+Clazz.overrideMethod (c$, "nextVertical", 
+function (t0, t1) {
+var t = -this.xcoeff1 / (2 * this.xcoeff2);
+if (t > t0 && t < t1) {
+return t;
+}return t1;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "enlarge", 
+function (r) {
+r.add (this.x0, this.y0);
+var t = -this.xcoeff1 / (2 * this.xcoeff2);
+if (t > 0 && t < 1) {
+r.add (this.XforT (t), this.YforT (t));
+}r.add (this.x1, this.y1);
+}, "java.awt.geom.Rectangle2D");
+Clazz.defineMethod (c$, "getSubCurve", 
+function (ystart, yend, dir) {
+var t0;
+var t1;
+if (ystart <= this.y0) {
+if (yend >= this.y1) {
+return this.getWithDirection (dir);
+}t0 = 0;
+} else {
+t0 = jssun.awt.geom.Order2.TforY (ystart, this.ycoeff0, this.ycoeff1, this.ycoeff2);
+}if (yend >= this.y1) {
+t1 = 1;
+} else {
+t1 = jssun.awt.geom.Order2.TforY (yend, this.ycoeff0, this.ycoeff1, this.ycoeff2);
+}var eqn =  Clazz.newDoubleArray (10, 0);
+eqn[0] = this.x0;
+eqn[1] = this.y0;
+eqn[2] = this.cx0;
+eqn[3] = this.cy0;
+eqn[4] = this.x1;
+eqn[5] = this.y1;
+if (t1 < 1) {
+jssun.awt.geom.Order2.split (eqn, 0, t1);
+}var i;
+if (t0 <= 0) {
+i = 0;
+} else {
+jssun.awt.geom.Order2.split (eqn, 0, t0 / t1);
+i = 4;
+}return  new jssun.awt.geom.Order2 (eqn[i + 0], ystart, eqn[i + 2], eqn[i + 3], eqn[i + 4], yend, dir);
+}, "~N,~N,~N");
+Clazz.overrideMethod (c$, "getReversedCurve", 
+function () {
+return  new jssun.awt.geom.Order2 (this.x0, this.y0, this.cx0, this.cy0, this.x1, this.y1, -this.direction);
+});
+Clazz.overrideMethod (c$, "getSegment", 
+function (coords) {
+coords[0] = this.cx0;
+coords[1] = this.cy0;
+if (this.direction == 1) {
+coords[2] = this.x1;
+coords[3] = this.y1;
+} else {
+coords[2] = this.x0;
+coords[3] = this.y0;
+}return 2;
+}, "~A");
+Clazz.overrideMethod (c$, "controlPointString", 
+function () {
+return ("(" + jssun.awt.geom.Curve.round (this.cx0) + ", " + jssun.awt.geom.Curve.round (this.cy0) + "), ");
+});
+});