1 Clazz.declarePackage ("java.awt.geom");
\r
2 Clazz.load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
10 Clazz.instantialize (this, arguments);
\r
11 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
\r
12 Clazz.makeConstructor (c$,
\r
16 this.w = r.getWidth ();
\r
17 this.h = r.getHeight ();
\r
19 if (this.w < 0 || this.h < 0) {
\r
21 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
\r
22 Clazz.overrideMethod (c$, "getWindingRule",
\r
26 Clazz.overrideMethod (c$, "isDone",
\r
28 return this.index > 5;
\r
30 Clazz.overrideMethod (c$, "next",
\r
34 Clazz.defineMethod (c$, "currentSegment",
\r
36 if (this.isDone ()) {
\r
37 throw new java.util.NoSuchElementException ("rect iterator out of bounds");
\r
38 }if (this.index == 5) {
\r
40 }coords[0] = this.x;
\r
42 if (this.index == 1 || this.index == 2) {
\r
43 coords[0] += this.w;
\r
44 }if (this.index == 2 || this.index == 3) {
\r
45 coords[1] += this.h;
\r
46 }if (this.affine != null) {
\r
47 this.affine.transform (coords, 0, coords, 0, 1);
\r
48 }return (this.index == 0 ? 0 : 1);
\r
50 Clazz.defineMethod (c$, "currentSegment",
\r
52 if (this.isDone ()) {
\r
53 throw new java.util.NoSuchElementException ("rect iterator out of bounds");
\r
54 }if (this.index == 5) {
\r
56 }coords[0] = this.x;
\r
58 if (this.index == 1 || this.index == 2) {
\r
59 coords[0] += this.w;
\r
60 }if (this.index == 2 || this.index == 3) {
\r
61 coords[1] += this.h;
\r
62 }if (this.affine != null) {
\r
63 this.affine.transform (coords, 0, coords, 0, 1);
\r
64 }return (this.index == 0 ? 0 : 1);
\r