1 Clazz.declarePackage ("jssun.awt.geom");
\r
2 c$ = Clazz.decorateAsClass (function () {
\r
7 this.equivalence = 0;
\r
8 this.lastEdge = null;
\r
11 Clazz.instantialize (this, arguments);
\r
12 }, jssun.awt.geom, "Edge");
\r
13 Clazz.makeConstructor (c$,
\r
14 function (c, ctag) {
\r
15 this.construct (c, ctag, 0);
\r
16 }, "jssun.awt.geom.Curve,~N");
\r
17 Clazz.makeConstructor (c$,
\r
18 function (c, ctag, etag) {
\r
22 }, "jssun.awt.geom.Curve,~N,~N");
\r
23 Clazz.defineMethod (c$, "getCurve",
\r
27 Clazz.defineMethod (c$, "getCurveTag",
\r
31 Clazz.defineMethod (c$, "getEdgeTag",
\r
35 Clazz.defineMethod (c$, "setEdgeTag",
\r
39 Clazz.defineMethod (c$, "getEquivalence",
\r
41 return this.equivalence;
\r
43 Clazz.defineMethod (c$, "setEquivalence",
\r
45 this.equivalence = eq;
\r
47 Clazz.defineMethod (c$, "compareTo",
\r
48 function (other, yrange) {
\r
49 if (other === this.lastEdge && yrange[0] < this.lastLimit) {
\r
50 if (yrange[1] > this.lastLimit) {
\r
51 yrange[1] = this.lastLimit;
\r
52 }return this.lastResult;
\r
53 }if (this === other.lastEdge && yrange[0] < other.lastLimit) {
\r
54 if (yrange[1] > other.lastLimit) {
\r
55 yrange[1] = other.lastLimit;
\r
56 }return 0 - other.lastResult;
\r
57 }var ret = this.curve.compareTo (other.curve, yrange);
\r
58 this.lastEdge = other;
\r
59 this.lastLimit = yrange[1];
\r
60 this.lastResult = ret;
\r
62 }, "jssun.awt.geom.Edge,~A");
\r
63 Clazz.defineMethod (c$, "record",
\r
64 function (yend, etag) {
\r
65 this.activey = yend;
\r
68 Clazz.defineMethod (c$, "isActiveFor",
\r
69 function (y, etag) {
\r
70 return (this.etag == etag && this.activey >= y);
\r
72 Clazz.overrideMethod (c$, "toString",
\r
74 return ("Edge[" + this.curve + ", " + (this.ctag == 0 ? "L" : "R") + ", " + (this.etag == 1 ? "I" : (this.etag == -1 ? "O" : "N")) + "]");
\r
76 Clazz.defineStatics (c$,
\r