1 Clazz.declarePackage ("java.awt.geom");
2 Clazz.load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
3 c$ = Clazz.decorateAsClass (function () {
7 Clazz.instantialize (this, arguments);
8 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
9 Clazz.makeConstructor (c$,
12 Clazz.makeConstructor (c$,
15 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
16 Clazz.defineMethod (c$, "set",
21 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
22 Clazz.overrideMethod (c$, "getWindingRule",
26 Clazz.overrideMethod (c$, "isDone",
28 return (this.index > 1);
30 Clazz.overrideMethod (c$, "next",
34 Clazz.defineMethod (c$, "currentSegment",
37 throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
39 if (this.index == 0) {
40 coords[0] = this.cubic.getX1 ();
41 coords[1] = this.cubic.getY1 ();
44 coords[0] = this.cubic.getCtrlX1 ();
45 coords[1] = this.cubic.getCtrlY1 ();
46 coords[2] = this.cubic.getCtrlX2 ();
47 coords[3] = this.cubic.getCtrlY2 ();
48 coords[4] = this.cubic.getX2 ();
49 coords[5] = this.cubic.getY2 ();
51 }if (this.affine != null) {
52 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
55 Clazz.defineMethod (c$, "currentSegment",
58 throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
60 if (this.index == 0) {
61 coords[0] = this.cubic.getX1 ();
62 coords[1] = this.cubic.getY1 ();
65 coords[0] = this.cubic.getCtrlX1 ();
66 coords[1] = this.cubic.getCtrlY1 ();
67 coords[2] = this.cubic.getCtrlX2 ();
68 coords[3] = this.cubic.getCtrlY2 ();
69 coords[4] = this.cubic.getX2 ();
70 coords[5] = this.cubic.getY2 ();
72 }if (this.affine != null) {
73 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);