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