1 Clazz.declarePackage ("java.awt.geom");
\r
2 Clazz.load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
7 Clazz.instantialize (this, arguments);
\r
8 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
\r
9 Clazz.makeConstructor (c$,
\r
13 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
\r
14 Clazz.overrideMethod (c$, "getWindingRule",
\r
18 Clazz.overrideMethod (c$, "isDone",
\r
20 return (this.index > 1);
\r
22 Clazz.overrideMethod (c$, "next",
\r
26 Clazz.defineMethod (c$, "currentSegment",
\r
28 if (this.isDone ()) {
\r
29 throw new java.util.NoSuchElementException ("line iterator out of bounds");
\r
31 if (this.index == 0) {
\r
32 coords[0] = this.line.getX1 ();
\r
33 coords[1] = this.line.getY1 ();
\r
36 coords[0] = this.line.getX2 ();
\r
37 coords[1] = this.line.getY2 ();
\r
39 }if (this.affine != null) {
\r
40 this.affine.transform (coords, 0, coords, 0, 1);
\r
43 Clazz.defineMethod (c$, "currentSegment",
\r
45 if (this.isDone ()) {
\r
46 throw new java.util.NoSuchElementException ("line iterator out of bounds");
\r
48 if (this.index == 0) {
\r
49 coords[0] = this.line.getX1 ();
\r
50 coords[1] = this.line.getY1 ();
\r
53 coords[0] = this.line.getX2 ();
\r
54 coords[1] = this.line.getY2 ();
\r
56 }if (this.affine != null) {
\r
57 this.affine.transform (coords, 0, coords, 0, 1);
\r