1 Clazz.declarePackage ("jssun.awt.geom");
2 Clazz.load (null, "jssun.awt.geom.CurveLink", ["java.lang.InternalError", "jssun.awt.geom.Order0"], function () {
3 c$ = Clazz.decorateAsClass (function () {
9 Clazz.instantialize (this, arguments);
10 }, jssun.awt.geom, "CurveLink");
11 Clazz.makeConstructor (c$,
12 function (curve, ystart, yend, etag) {
17 if (this.ytop < curve.getYTop () || this.ybot > curve.getYBot ()) {
18 throw new InternalError ("bad curvelink [" + this.ytop + "=>" + this.ybot + "] for " + curve);
19 }}, "jssun.awt.geom.Curve,~N,~N,~N");
20 Clazz.defineMethod (c$, "absorb",
22 return this.absorb (link.curve, link.ytop, link.ybot, link.etag);
23 }, "jssun.awt.geom.CurveLink");
24 Clazz.defineMethod (c$, "absorb",
25 function (curve, ystart, yend, etag) {
26 if (this.curve !== curve || this.etag != etag || this.ybot < ystart || this.ytop > yend) {
28 }if (ystart < curve.getYTop () || yend > curve.getYBot ()) {
29 throw new InternalError ("bad curvelink [" + ystart + "=>" + yend + "] for " + curve);
30 }this.ytop = Math.min (this.ytop, ystart);
31 this.ybot = Math.max (this.ybot, yend);
33 }, "jssun.awt.geom.Curve,~N,~N,~N");
34 Clazz.defineMethod (c$, "isEmpty",
36 return (this.ytop == this.ybot);
38 Clazz.defineMethod (c$, "getCurve",
42 Clazz.defineMethod (c$, "getSubCurve",
44 if (this.ytop == this.curve.getYTop () && this.ybot == this.curve.getYBot ()) {
45 return this.curve.getWithDirection (this.etag);
46 }return this.curve.getSubCurve (this.ytop, this.ybot, this.etag);
48 Clazz.defineMethod (c$, "getMoveto",
50 return new jssun.awt.geom.Order0 (this.getXTop (), this.getYTop ());
52 Clazz.defineMethod (c$, "getXTop",
54 return this.curve.XforY (this.ytop);
56 Clazz.defineMethod (c$, "getYTop",
60 Clazz.defineMethod (c$, "getXBot",
62 return this.curve.XforY (this.ybot);
64 Clazz.defineMethod (c$, "getYBot",
68 Clazz.defineMethod (c$, "getX",
70 return this.curve.XforY (this.ytop);
72 Clazz.defineMethod (c$, "getEdgeTag",
76 Clazz.defineMethod (c$, "setNext",
79 }, "jssun.awt.geom.CurveLink");
80 Clazz.defineMethod (c$, "getNext",