1 Clazz.declarePackage ("java.awt.geom");
2 Clazz.load (["java.awt.Shape", "java.awt.geom.PathIterator"], "java.awt.geom.Path2D", ["java.lang.Double", "$.IllegalArgumentException", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.IllegalPathStateException", "$.Point2D", "$.Rectangle2D", "jssun.awt.geom.Curve"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.pointTypes = null;
8 Clazz.instantialize (this, arguments);
9 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
10 Clazz.makeConstructor (c$,
13 Clazz.makeConstructor (c$,
14 function (rule, initialTypes) {
15 this.setWindingRule (rule);
16 this.pointTypes = Clazz.newByteArray (initialTypes, 0);
18 Clazz.defineMethod (c$, "closePath",
20 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
21 this.needRoom (true, 0);
22 this.pointTypes[this.numTypes++] = 4;
24 Clazz.defineMethod (c$, "append",
25 function (s, connect) {
26 this.append (s.getPathIterator (null), connect);
27 }, "java.awt.Shape,~B");
28 Clazz.defineMethod (c$, "getWindingRule",
30 return this.windingRule;
32 Clazz.defineMethod (c$, "setWindingRule",
34 if (rule != 0 && rule != 1) {
35 throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
36 }this.windingRule = rule;
38 Clazz.defineMethod (c$, "getCurrentPoint",
40 var index = this.numCoords;
41 if (this.numTypes < 1 || index < 1) {
43 }if (this.pointTypes[this.numTypes - 1] == 4) {
44 loop : for (var i = this.numTypes - 2; i > 0; i--) {
45 switch (this.pointTypes[i]) {
61 }return this.getPoint (index - 2);
63 Clazz.defineMethod (c$, "reset",
65 this.numTypes = this.numCoords = 0;
67 Clazz.defineMethod (c$, "createTransformedShape",
69 var p2d = this.clone ();
73 }, "java.awt.geom.AffineTransform");
74 Clazz.overrideMethod (c$, "getBounds",
76 return this.getBounds2D ().getBounds ();
78 c$.contains = Clazz.defineMethod (c$, "contains",
80 if (x * 0.0 + y * 0.0 == 0.0) {
81 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
82 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
83 return ((cross & mask) != 0);
86 }}, "java.awt.geom.PathIterator,~N,~N");
87 c$.contains = Clazz.defineMethod (c$, "contains",
89 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
90 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
91 Clazz.defineMethod (c$, "contains",
93 if (x * 0.0 + y * 0.0 == 0.0) {
94 if (this.numTypes < 2) {
96 }var mask = (this.windingRule == 1 ? -1 : 1);
97 return ((this.pointCrossings (x, y) & mask) != 0);
101 Clazz.defineMethod (c$, "contains",
103 return this.contains (p.getX (), p.getY ());
104 }, "java.awt.geom.Point2D");
105 c$.contains = Clazz.defineMethod (c$, "contains",
106 function (pi, x, y, w, h) {
107 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
109 }if (w <= 0 || h <= 0) {
111 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
112 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
113 return (crossings != -2147483648 && (crossings & mask) != 0);
114 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
115 c$.contains = Clazz.defineMethod (c$, "contains",
117 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
118 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
119 Clazz.defineMethod (c$, "contains",
120 function (x, y, w, h) {
121 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
123 }if (w <= 0 || h <= 0) {
125 }var mask = (this.windingRule == 1 ? -1 : 2);
126 var crossings = this.rectCrossings (x, y, x + w, y + h);
127 return (crossings != -2147483648 && (crossings & mask) != 0);
129 Clazz.defineMethod (c$, "contains",
131 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
132 }, "java.awt.geom.Rectangle2D");
133 c$.intersects = Clazz.defineMethod (c$, "intersects",
134 function (pi, x, y, w, h) {
135 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
137 }if (w <= 0 || h <= 0) {
139 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
140 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
141 return (crossings == -2147483648 || (crossings & mask) != 0);
142 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
143 c$.intersects = Clazz.defineMethod (c$, "intersects",
145 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
146 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
147 Clazz.defineMethod (c$, "intersects",
148 function (x, y, w, h) {
149 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
151 }if (w <= 0 || h <= 0) {
153 }var mask = (this.windingRule == 1 ? -1 : 2);
154 var crossings = this.rectCrossings (x, y, x + w, y + h);
155 return (crossings == -2147483648 || (crossings & mask) != 0);
157 Clazz.defineMethod (c$, "intersects",
159 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
160 }, "java.awt.geom.Rectangle2D");
161 Clazz.overrideMethod (c$, "getPathIterator",
162 function (at, flatness) {
163 return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
164 }, "java.awt.geom.AffineTransform,~N");
166 c$ = Clazz.decorateAsClass (function () {
170 Clazz.instantialize (this, arguments);
171 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
172 Clazz.makeConstructor (c$,
175 }, "java.awt.geom.Path2D");
176 Clazz.overrideMethod (c$, "getWindingRule",
178 return this.path.getWindingRule ();
180 Clazz.overrideMethod (c$, "isDone",
182 return (this.typeIdx >= this.path.numTypes);
184 Clazz.overrideMethod (c$, "next",
186 var a = this.path.pointTypes[this.typeIdx++];
187 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
189 Clazz.defineStatics (c$,
190 "curvecoords", Clazz.newIntArray (-1, [2, 2, 4, 6, 0]));
193 c$ = Clazz.decorateAsClass (function () {
194 this.floatCoords = null;
195 Clazz.instantialize (this, arguments);
196 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
197 Clazz.makeConstructor (c$,
199 this.construct (1, 20);
201 Clazz.makeConstructor (c$,
203 this.construct (a, 20);
205 Clazz.makeConstructor (c$,
207 Clazz.superConstructor (this, java.awt.geom.Path2D.Float, []);
208 this.setWindingRule (a);
209 this.pointTypes = Clazz.newByteArray (b, 0);
210 this.floatCoords = Clazz.newFloatArray (b * 2, 0);
212 Clazz.makeConstructor (c$,
214 this.construct (a, null);
215 }, "java.awt.Shape");
216 Clazz.makeConstructor (c$,
218 Clazz.superConstructor (this, java.awt.geom.Path2D.Float, []);
220 }, "java.awt.Shape,java.awt.geom.AffineTransform");
221 Clazz.defineMethod (c$, "setPath",
223 if (Clazz.instanceOf (a, java.awt.geom.Path2D)) {
225 this.setWindingRule (c.windingRule);
226 this.numTypes = c.numTypes;
227 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
228 this.numCoords = c.numCoords;
229 this.floatCoords = c.cloneCoordsFloat (b);
231 var c = a.getPathIterator (b);
232 this.setWindingRule (c.getWindingRule ());
233 this.pointTypes = Clazz.newByteArray (20, 0);
234 this.floatCoords = Clazz.newFloatArray (40, 0);
235 this.append (c, false);
236 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
237 Clazz.defineMethod (c$, "cloneCoordsFloat",
241 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
243 b = Clazz.newFloatArray (this.floatCoords.length, 0);
244 a.transform (this.floatCoords, 0, b, 0, Clazz.doubleToInt (this.numCoords / 2));
246 }, "java.awt.geom.AffineTransform");
247 Clazz.overrideMethod (c$, "cloneCoordsDouble",
249 var b = Clazz.newDoubleArray (this.floatCoords.length, 0);
251 for (var c = 0; c < this.numCoords; c++) {
252 b[c] = this.floatCoords[c];
255 a.transform (this.floatCoords, 0, b, 0, Clazz.doubleToInt (this.numCoords / 2));
257 }, "java.awt.geom.AffineTransform");
258 Clazz.defineMethod (c$, "append",
261 if (typeof pi == "number") {
262 this.floatCoords[this.numCoords++] = pi;
263 this.floatCoords[this.numCoords++] = connect;
266 }var c = Clazz.newFloatArray (6, 0);
267 while (!a.isDone ()) {
268 switch (a.currentSegment (c)) {
270 if (!b || this.numTypes < 1 || this.numCoords < 1) {
271 this.moveTo (c[0], c[1]);
273 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
276 this.lineTo (c[0], c[1]);
279 this.quadTo (c[0], c[1], c[2], c[3]);
282 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
291 }, "java.awt.geom.PathIterator,~B");
292 Clazz.overrideMethod (c$, "getPoint",
294 return new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
296 Clazz.overrideMethod (c$, "needRoom",
298 if (a && this.numTypes == 0) {
299 throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
300 }var c = this.pointTypes.length;
301 if (this.numTypes >= c) {
305 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
306 }c = this.floatCoords.length;
307 if (this.numCoords + b > c) {
313 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
315 Clazz.defineMethod (c$, "moveTo",
317 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
318 this.floatCoords[this.numCoords - 2] = a;
319 this.floatCoords[this.numCoords - 1] = b;
321 this.needRoom (false, 2);
322 this.pointTypes[this.numTypes++] = 0;
323 this.floatCoords[this.numCoords++] = a;
324 this.floatCoords[this.numCoords++] = b;
326 Clazz.defineMethod (c$, "moveTo",
328 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
329 this.floatCoords[this.numCoords - 2] = a;
330 this.floatCoords[this.numCoords - 1] = b;
332 this.needRoom (false, 2);
333 this.pointTypes[this.numTypes++] = 0;
334 this.floatCoords[this.numCoords++] = a;
335 this.floatCoords[this.numCoords++] = b;
337 Clazz.defineMethod (c$, "lineTo",
339 this.needRoom (true, 2);
340 this.pointTypes[this.numTypes++] = 1;
341 this.floatCoords[this.numCoords++] = a;
342 this.floatCoords[this.numCoords++] = b;
344 Clazz.defineMethod (c$, "lineTo",
346 this.needRoom (true, 2);
347 this.pointTypes[this.numTypes++] = 1;
348 this.floatCoords[this.numCoords++] = a;
349 this.floatCoords[this.numCoords++] = b;
351 Clazz.defineMethod (c$, "quadTo",
352 function (a, b, c, d) {
353 this.needRoom (true, 4);
354 this.pointTypes[this.numTypes++] = 2;
355 this.floatCoords[this.numCoords++] = a;
356 this.floatCoords[this.numCoords++] = b;
357 this.floatCoords[this.numCoords++] = c;
358 this.floatCoords[this.numCoords++] = d;
360 Clazz.defineMethod (c$, "quadTo",
361 function (a, b, c, d) {
362 this.needRoom (true, 4);
363 this.pointTypes[this.numTypes++] = 2;
364 this.floatCoords[this.numCoords++] = a;
365 this.floatCoords[this.numCoords++] = b;
366 this.floatCoords[this.numCoords++] = c;
367 this.floatCoords[this.numCoords++] = d;
369 Clazz.defineMethod (c$, "curveTo",
370 function (a, b, c, d, e, f) {
371 this.needRoom (true, 6);
372 this.pointTypes[this.numTypes++] = 3;
373 this.floatCoords[this.numCoords++] = a;
374 this.floatCoords[this.numCoords++] = b;
375 this.floatCoords[this.numCoords++] = c;
376 this.floatCoords[this.numCoords++] = d;
377 this.floatCoords[this.numCoords++] = e;
378 this.floatCoords[this.numCoords++] = f;
379 }, "~N,~N,~N,~N,~N,~N");
380 Clazz.defineMethod (c$, "curveTo",
381 function (a, b, c, d, e, f) {
382 this.needRoom (true, 6);
383 this.pointTypes[this.numTypes++] = 3;
384 this.floatCoords[this.numCoords++] = a;
385 this.floatCoords[this.numCoords++] = b;
386 this.floatCoords[this.numCoords++] = c;
387 this.floatCoords[this.numCoords++] = d;
388 this.floatCoords[this.numCoords++] = e;
389 this.floatCoords[this.numCoords++] = f;
390 }, "~N,~N,~N,~N,~N,~N");
391 Clazz.overrideMethod (c$, "pointCrossings",
399 var i = this.floatCoords;
404 for (var l = 1; l < this.numTypes; l++) {
405 switch (this.pointTypes[l]) {
408 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
413 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
418 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
423 j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0);
429 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
436 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
439 Clazz.overrideMethod (c$, "rectCrossings",
440 function (a, b, c, d) {
441 var e = this.floatCoords;
452 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
453 switch (this.pointTypes[n]) {
455 if (f != h || g != i) {
456 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
461 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
466 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
471 l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0);
476 if (f != h || g != i) {
477 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
483 if (l != -2147483648 && (f != h || g != i)) {
484 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
487 Clazz.overrideMethod (c$, "transform",
489 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz.doubleToInt (this.numCoords / 2));
490 }, "java.awt.geom.AffineTransform");
491 Clazz.overrideMethod (c$, "getBounds2D",
497 var e = this.numCoords;
499 b = d = this.floatCoords[--e];
500 a = c = this.floatCoords[--e];
502 var f = this.floatCoords[--e];
503 var g = this.floatCoords[--e];
511 }return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
513 Clazz.defineMethod (c$, "getPathIterator",
516 return new java.awt.geom.Path2D.Float.CopyIterator (this);
518 return new java.awt.geom.Path2D.Float.TxIterator (this, a);
519 }}, "java.awt.geom.AffineTransform");
520 Clazz.overrideMethod (c$, "clone",
522 return new java.awt.geom.Path2D.Float (this);
525 c$ = Clazz.decorateAsClass (function () {
526 this.floatCoords = null;
527 Clazz.instantialize (this, arguments);
528 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
529 Clazz.makeConstructor (c$,
531 Clazz.superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
532 this.floatCoords = a.floatCoords;
533 }, "java.awt.geom.Path2D.Float");
534 Clazz.defineMethod (c$, "currentSegment",
536 var b = this.path.pointTypes[this.typeIdx];
537 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
539 for (var d = 0; d < c; d++) {
540 a[d] = this.floatCoords[this.pointIdx + d];
546 c$ = Clazz.decorateAsClass (function () {
547 this.floatCoords = null;
549 Clazz.instantialize (this, arguments);
550 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
551 Clazz.makeConstructor (c$,
553 Clazz.superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
554 this.floatCoords = a.floatCoords;
556 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
557 Clazz.defineMethod (c$, "currentSegment",
559 var b = this.path.pointTypes[this.typeIdx];
560 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
562 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz.doubleToInt (c / 2));
568 c$ = Clazz.decorateAsClass (function () {
569 this.doubleCoords = null;
570 Clazz.instantialize (this, arguments);
571 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
572 Clazz.makeConstructor (c$,
574 this.construct (1, 20);
576 Clazz.makeConstructor (c$,
578 this.construct (a, 20);
580 Clazz.makeConstructor (c$,
582 Clazz.superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
583 this.doubleCoords = Clazz.newDoubleArray (b * 2, 0);
585 Clazz.makeConstructor (c$,
587 this.construct (a, null);
588 }, "java.awt.Shape");
589 Clazz.makeConstructor (c$,
591 Clazz.superConstructor (this, java.awt.geom.Path2D.Double, []);
592 if (Clazz.instanceOf (a, java.awt.geom.Path2D)) {
594 this.setWindingRule (c.windingRule);
595 this.numTypes = c.numTypes;
596 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
597 this.numCoords = c.numCoords;
598 this.doubleCoords = c.cloneCoordsDouble (b);
600 var c = a.getPathIterator (b);
601 this.setWindingRule (c.getWindingRule ());
602 this.pointTypes = Clazz.newByteArray (20, 0);
603 this.doubleCoords = Clazz.newDoubleArray (40, 0);
604 this.append (c, false);
605 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
606 Clazz.overrideMethod (c$, "cloneCoordsFloat",
608 var b = Clazz.newFloatArray (this.doubleCoords.length, 0);
610 for (var c = 0; c < this.numCoords; c++) {
611 b[c] = this.doubleCoords[c];
614 a.transform (this.doubleCoords, 0, b, 0, Clazz.doubleToInt (this.numCoords / 2));
616 }, "java.awt.geom.AffineTransform");
617 Clazz.defineMethod (c$, "cloneCoordsDouble",
621 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
623 b = Clazz.newDoubleArray (this.doubleCoords.length, 0);
624 a.transform (this.doubleCoords, 0, b, 0, Clazz.doubleToInt (this.numCoords / 2));
626 }, "java.awt.geom.AffineTransform");
627 Clazz.defineMethod (c$, "append",
630 if (typeof pi == "number") {
631 this.floatCoords[this.numCoords++] = pi;
632 this.floatCoords[this.numCoords++] = connect;
635 }var c = Clazz.newDoubleArray (6, 0);
636 while (!a.isDone ()) {
637 switch (a.currentSegment (c)) {
639 if (!b || this.numTypes < 1 || this.numCoords < 1) {
640 this.moveTo (c[0], c[1]);
642 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
645 this.lineTo (c[0], c[1]);
648 this.quadTo (c[0], c[1], c[2], c[3]);
651 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
660 }, "java.awt.geom.PathIterator,~B");
661 Clazz.overrideMethod (c$, "getPoint",
663 return new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
665 Clazz.overrideMethod (c$, "needRoom",
667 if (a && this.numTypes == 0) {
668 throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
669 }var c = this.pointTypes.length;
670 if (this.numTypes >= c) {
674 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
675 }c = this.doubleCoords.length;
676 if (this.numCoords + b > c) {
682 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
684 Clazz.overrideMethod (c$, "moveTo",
686 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
687 this.doubleCoords[this.numCoords - 2] = a;
688 this.doubleCoords[this.numCoords - 1] = b;
690 this.needRoom (false, 2);
691 this.pointTypes[this.numTypes++] = 0;
692 this.doubleCoords[this.numCoords++] = a;
693 this.doubleCoords[this.numCoords++] = b;
695 Clazz.overrideMethod (c$, "lineTo",
697 this.needRoom (true, 2);
698 this.pointTypes[this.numTypes++] = 1;
699 this.doubleCoords[this.numCoords++] = a;
700 this.doubleCoords[this.numCoords++] = b;
702 Clazz.overrideMethod (c$, "quadTo",
703 function (a, b, c, d) {
704 this.needRoom (true, 4);
705 this.pointTypes[this.numTypes++] = 2;
706 this.doubleCoords[this.numCoords++] = a;
707 this.doubleCoords[this.numCoords++] = b;
708 this.doubleCoords[this.numCoords++] = c;
709 this.doubleCoords[this.numCoords++] = d;
711 Clazz.overrideMethod (c$, "curveTo",
712 function (a, b, c, d, e, f) {
713 this.needRoom (true, 6);
714 this.pointTypes[this.numTypes++] = 3;
715 this.doubleCoords[this.numCoords++] = a;
716 this.doubleCoords[this.numCoords++] = b;
717 this.doubleCoords[this.numCoords++] = c;
718 this.doubleCoords[this.numCoords++] = d;
719 this.doubleCoords[this.numCoords++] = e;
720 this.doubleCoords[this.numCoords++] = f;
721 }, "~N,~N,~N,~N,~N,~N");
722 Clazz.overrideMethod (c$, "pointCrossings",
730 var i = this.doubleCoords;
735 for (var l = 1; l < this.numTypes; l++) {
736 switch (this.pointTypes[l]) {
739 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
744 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
749 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
754 j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0);
760 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
767 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
770 Clazz.overrideMethod (c$, "rectCrossings",
771 function (a, b, c, d) {
772 var e = this.doubleCoords;
783 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
784 switch (this.pointTypes[n]) {
786 if (f != h || g != i) {
787 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
794 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
799 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
804 l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0);
809 if (f != h || g != i) {
810 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
816 if (l != -2147483648 && (f != h || g != i)) {
817 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
820 Clazz.overrideMethod (c$, "transform",
822 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz.doubleToInt (this.numCoords / 2));
823 }, "java.awt.geom.AffineTransform");
824 Clazz.overrideMethod (c$, "getBounds2D",
830 var e = this.numCoords;
832 b = d = this.doubleCoords[--e];
833 a = c = this.doubleCoords[--e];
835 var f = this.doubleCoords[--e];
836 var g = this.doubleCoords[--e];
844 }return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
846 Clazz.defineMethod (c$, "getPathIterator",
849 return new java.awt.geom.Path2D.Double.CopyIterator (this);
851 return new java.awt.geom.Path2D.Double.TxIterator (this, a);
852 }}, "java.awt.geom.AffineTransform");
853 Clazz.overrideMethod (c$, "clone",
855 return new java.awt.geom.Path2D.Double (this);
858 c$ = Clazz.decorateAsClass (function () {
859 this.doubleCoords = null;
860 Clazz.instantialize (this, arguments);
861 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
862 Clazz.makeConstructor (c$,
864 Clazz.superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
865 this.doubleCoords = a.doubleCoords;
866 }, "java.awt.geom.Path2D.Double");
867 Clazz.defineMethod (c$, "currentSegment",
869 var b = this.path.pointTypes[this.typeIdx];
870 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
872 for (var d = 0; d < c; d++) {
873 a[d] = this.doubleCoords[this.pointIdx + d];
877 Clazz.defineMethod (c$, "currentSegment",
879 var b = this.path.pointTypes[this.typeIdx];
880 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
882 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
887 c$ = Clazz.decorateAsClass (function () {
888 this.doubleCoords = null;
890 Clazz.instantialize (this, arguments);
891 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
892 Clazz.makeConstructor (c$,
894 Clazz.superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
895 this.doubleCoords = a.doubleCoords;
897 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
898 Clazz.defineMethod (c$, "currentSegment",
900 var b = this.path.pointTypes[this.typeIdx];
901 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
903 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz.doubleToInt (c / 2));
906 Clazz.defineMethod (c$, "currentSegment",
908 var b = this.path.pointTypes[this.typeIdx];
909 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
911 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz.doubleToInt (c / 2));
916 Clazz.defineStatics (c$,