X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjssun%2Fawt%2Fgeom%2FEdge.js;fp=site%2Fj2s%2Fjssun%2Fawt%2Fgeom%2FEdge.js;h=a75df8f448ceeb5927c88e6359b8726e0424c998;hp=944d31de7bdfc293a2b00e4f8870339f1b3aa377;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jssun/awt/geom/Edge.js b/site/j2s/jssun/awt/geom/Edge.js index 944d31d..a75df8f 100644 --- a/site/j2s/jssun/awt/geom/Edge.js +++ b/site/j2s/jssun/awt/geom/Edge.js @@ -1,78 +1,78 @@ -Clazz.declarePackage ("jssun.awt.geom"); -c$ = Clazz.decorateAsClass (function () { -this.curve = null; -this.ctag = 0; -this.etag = 0; -this.activey = 0; -this.equivalence = 0; -this.lastEdge = null; -this.lastResult = 0; -this.lastLimit = 0; -Clazz.instantialize (this, arguments); -}, jssun.awt.geom, "Edge"); -Clazz.makeConstructor (c$, -function (c, ctag) { -this.construct (c, ctag, 0); -}, "jssun.awt.geom.Curve,~N"); -Clazz.makeConstructor (c$, -function (c, ctag, etag) { -this.curve = c; -this.ctag = ctag; -this.etag = etag; -}, "jssun.awt.geom.Curve,~N,~N"); -Clazz.defineMethod (c$, "getCurve", -function () { -return this.curve; -}); -Clazz.defineMethod (c$, "getCurveTag", -function () { -return this.ctag; -}); -Clazz.defineMethod (c$, "getEdgeTag", -function () { -return this.etag; -}); -Clazz.defineMethod (c$, "setEdgeTag", -function (etag) { -this.etag = etag; -}, "~N"); -Clazz.defineMethod (c$, "getEquivalence", -function () { -return this.equivalence; -}); -Clazz.defineMethod (c$, "setEquivalence", -function (eq) { -this.equivalence = eq; -}, "~N"); -Clazz.defineMethod (c$, "compareTo", -function (other, yrange) { -if (other === this.lastEdge && yrange[0] < this.lastLimit) { -if (yrange[1] > this.lastLimit) { -yrange[1] = this.lastLimit; -}return this.lastResult; -}if (this === other.lastEdge && yrange[0] < other.lastLimit) { -if (yrange[1] > other.lastLimit) { -yrange[1] = other.lastLimit; -}return 0 - other.lastResult; -}var ret = this.curve.compareTo (other.curve, yrange); -this.lastEdge = other; -this.lastLimit = yrange[1]; -this.lastResult = ret; -return ret; -}, "jssun.awt.geom.Edge,~A"); -Clazz.defineMethod (c$, "record", -function (yend, etag) { -this.activey = yend; -this.etag = etag; -}, "~N,~N"); -Clazz.defineMethod (c$, "isActiveFor", -function (y, etag) { -return (this.etag == etag && this.activey >= y); -}, "~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return ("Edge[" + this.curve + ", " + (this.ctag == 0 ? "L" : "R") + ", " + (this.etag == 1 ? "I" : (this.etag == -1 ? "O" : "N")) + "]"); -}); -Clazz.defineStatics (c$, -"INIT_PARTS", 4, -"GROW_PARTS", 10); +Clazz.declarePackage ("jssun.awt.geom"); +c$ = Clazz.decorateAsClass (function () { +this.curve = null; +this.ctag = 0; +this.etag = 0; +this.activey = 0; +this.equivalence = 0; +this.lastEdge = null; +this.lastResult = 0; +this.lastLimit = 0; +Clazz.instantialize (this, arguments); +}, jssun.awt.geom, "Edge"); +Clazz.makeConstructor (c$, +function (c, ctag) { +this.construct (c, ctag, 0); +}, "jssun.awt.geom.Curve,~N"); +Clazz.makeConstructor (c$, +function (c, ctag, etag) { +this.curve = c; +this.ctag = ctag; +this.etag = etag; +}, "jssun.awt.geom.Curve,~N,~N"); +Clazz.defineMethod (c$, "getCurve", +function () { +return this.curve; +}); +Clazz.defineMethod (c$, "getCurveTag", +function () { +return this.ctag; +}); +Clazz.defineMethod (c$, "getEdgeTag", +function () { +return this.etag; +}); +Clazz.defineMethod (c$, "setEdgeTag", +function (etag) { +this.etag = etag; +}, "~N"); +Clazz.defineMethod (c$, "getEquivalence", +function () { +return this.equivalence; +}); +Clazz.defineMethod (c$, "setEquivalence", +function (eq) { +this.equivalence = eq; +}, "~N"); +Clazz.defineMethod (c$, "compareTo", +function (other, yrange) { +if (other === this.lastEdge && yrange[0] < this.lastLimit) { +if (yrange[1] > this.lastLimit) { +yrange[1] = this.lastLimit; +}return this.lastResult; +}if (this === other.lastEdge && yrange[0] < other.lastLimit) { +if (yrange[1] > other.lastLimit) { +yrange[1] = other.lastLimit; +}return 0 - other.lastResult; +}var ret = this.curve.compareTo (other.curve, yrange); +this.lastEdge = other; +this.lastLimit = yrange[1]; +this.lastResult = ret; +return ret; +}, "jssun.awt.geom.Edge,~A"); +Clazz.defineMethod (c$, "record", +function (yend, etag) { +this.activey = yend; +this.etag = etag; +}, "~N,~N"); +Clazz.defineMethod (c$, "isActiveFor", +function (y, etag) { +return (this.etag == etag && this.activey >= y); +}, "~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return ("Edge[" + this.curve + ", " + (this.ctag == 0 ? "L" : "R") + ", " + (this.etag == 1 ? "I" : (this.etag == -1 ? "O" : "N")) + "]"); +}); +Clazz.defineStatics (c$, +"INIT_PARTS", 4, +"GROW_PARTS", 10);