home *** CD-ROM | disk | FTP | other *** search
- package java.awt.geom;
-
- import java.util.NoSuchElementException;
-
- class RectIterator implements PathIterator {
- // $FF: renamed from: x double
- double field_0;
- // $FF: renamed from: y double
- double field_1;
- // $FF: renamed from: w double
- double field_2;
- // $FF: renamed from: h double
- double field_3;
- AffineTransform affine;
- int index;
-
- RectIterator(Rectangle2D var1, AffineTransform var2) {
- this.field_0 = ((RectangularShape)var1).getX();
- this.field_1 = ((RectangularShape)var1).getY();
- this.field_2 = ((RectangularShape)var1).getWidth();
- this.field_3 = ((RectangularShape)var1).getHeight();
- this.affine = var2;
- if (this.field_2 < (double)0.0F || this.field_3 < (double)0.0F) {
- this.index = 6;
- }
-
- }
-
- public int getWindingRule() {
- return 1;
- }
-
- public boolean isDone() {
- return this.index > 5;
- }
-
- public void next() {
- ++this.index;
- }
-
- public int currentSegment(float[] var1) {
- if (this.isDone()) {
- throw new NoSuchElementException("rect iterator out of bounds");
- } else if (this.index == 5) {
- return 4;
- } else {
- var1[0] = (float)this.field_0;
- var1[1] = (float)this.field_1;
- if (this.index == 1 || this.index == 2) {
- var1[0] += (float)this.field_2;
- }
-
- if (this.index == 2 || this.index == 3) {
- var1[1] += (float)this.field_3;
- }
-
- if (this.affine != null) {
- this.affine.transform(var1, 0, var1, 0, 1);
- }
-
- return this.index == 0 ? 0 : 1;
- }
- }
-
- public int currentSegment(double[] var1) {
- if (this.isDone()) {
- throw new NoSuchElementException("rect iterator out of bounds");
- } else if (this.index == 5) {
- return 4;
- } else {
- var1[0] = this.field_0;
- var1[1] = this.field_1;
- if (this.index == 1 || this.index == 2) {
- var1[0] += this.field_2;
- }
-
- if (this.index == 2 || this.index == 3) {
- var1[1] += this.field_3;
- }
-
- if (this.affine != null) {
- this.affine.transform(var1, 0, var1, 0, 1);
- }
-
- return this.index == 0 ? 0 : 1;
- }
- }
- }
-