1 Clazz.declarePackage ("java.awt.geom");
\r
2 Clazz.load (["java.awt.geom.PathIterator"], "java.awt.geom.EllipseIterator", ["java.util.NoSuchElementException"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
10 Clazz.instantialize (this, arguments);
\r
11 }, java.awt.geom, "EllipseIterator", null, java.awt.geom.PathIterator);
\r
12 Clazz.makeConstructor (c$,
\r
16 this.w = e.getWidth ();
\r
17 this.h = e.getHeight ();
\r
19 if (this.w < 0 || this.h < 0) {
\r
21 }}, "java.awt.geom.Ellipse2D,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 ("ellipse iterator out of bounds");
\r
38 }if (this.index == 5) {
\r
40 }if (this.index == 0) {
\r
41 var ctrls = java.awt.geom.EllipseIterator.ctrlpts[3];
\r
42 coords[0] = (this.x + ctrls[4] * this.w);
\r
43 coords[1] = (this.y + ctrls[5] * this.h);
\r
44 if (this.affine != null) {
\r
45 this.affine.transform (coords, 0, coords, 0, 1);
\r
47 }var ctrls = java.awt.geom.EllipseIterator.ctrlpts[this.index - 1];
\r
48 coords[0] = (this.x + ctrls[0] * this.w);
\r
49 coords[1] = (this.y + ctrls[1] * this.h);
\r
50 coords[2] = (this.x + ctrls[2] * this.w);
\r
51 coords[3] = (this.y + ctrls[3] * this.h);
\r
52 coords[4] = (this.x + ctrls[4] * this.w);
\r
53 coords[5] = (this.y + ctrls[5] * this.h);
\r
54 if (this.affine != null) {
\r
55 this.affine.transform (coords, 0, coords, 0, 3);
\r
58 Clazz.defineMethod (c$, "currentSegment",
\r
60 if (this.isDone ()) {
\r
61 throw new java.util.NoSuchElementException ("ellipse iterator out of bounds");
\r
62 }if (this.index == 5) {
\r
64 }if (this.index == 0) {
\r
65 var ctrls = java.awt.geom.EllipseIterator.ctrlpts[3];
\r
66 coords[0] = this.x + ctrls[4] * this.w;
\r
67 coords[1] = this.y + ctrls[5] * this.h;
\r
68 if (this.affine != null) {
\r
69 this.affine.transform (coords, 0, coords, 0, 1);
\r
71 }var ctrls = java.awt.geom.EllipseIterator.ctrlpts[this.index - 1];
\r
72 coords[0] = this.x + ctrls[0] * this.w;
\r
73 coords[1] = this.y + ctrls[1] * this.h;
\r
74 coords[2] = this.x + ctrls[2] * this.w;
\r
75 coords[3] = this.y + ctrls[3] * this.h;
\r
76 coords[4] = this.x + ctrls[4] * this.w;
\r
77 coords[5] = this.y + ctrls[5] * this.h;
\r
78 if (this.affine != null) {
\r
79 this.affine.transform (coords, 0, coords, 0, 3);
\r
82 Clazz.defineStatics (c$,
\r
83 "CtrlVal", 0.5522847498307933,
\r
84 "pcv", 0.7761423749153966,
\r
85 "ncv", 0.22385762508460333,
\r
86 "ctrlpts", Clazz.newArray (-1, [ Clazz.newDoubleArray (-1, [1.0, 0.7761423749153966, 0.7761423749153966, 1.0, 0.5, 1.0]), Clazz.newDoubleArray (-1, [0.22385762508460333, 1.0, 0.0, 0.7761423749153966, 0.0, 0.5]), Clazz.newDoubleArray (-1, [0.0, 0.22385762508460333, 0.22385762508460333, 0.0, 0.5, 0.0]), Clazz.newDoubleArray (-1, [0.7761423749153966, 0.0, 1.0, 0.22385762508460333, 1.0, 0.5])]));
\r