597 |
&& m10 == t.m10 && m11 == t.m11 && m12 == t.m12); |
&& m10 == t.m10 && m11 == t.m11 && m12 == t.m12); |
598 |
} |
} |
599 |
|
|
|
// This iterator is used to apply an AffineTransform to some other |
|
|
// iterator. It is not private because we want to be able to access |
|
|
// it from the rest of this package. |
|
|
class Iterator implements PathIterator |
|
|
{ |
|
|
// The iterator we are applied to. |
|
|
private PathIterator subIterator; |
|
|
|
|
|
public Iterator (PathIterator subIterator) |
|
|
{ |
|
|
this.subIterator = subIterator; |
|
|
} |
|
|
|
|
|
public int currentSegment (double[] coords) |
|
|
{ |
|
|
int r = subIterator.currentSegment (coords); |
|
|
int count = 0; |
|
|
|
|
|
switch (r) |
|
|
{ |
|
|
case SEG_CUBICTO: |
|
|
count = 3; |
|
|
break; |
|
|
|
|
|
case SEG_QUADTO: |
|
|
count = 2; |
|
|
break; |
|
|
|
|
|
case SEG_LINETO: |
|
|
case SEG_MOVETO: |
|
|
count = 1; |
|
|
break; |
|
|
|
|
|
default: |
|
|
// Error. But how to report? |
|
|
case SEG_CLOSE: |
|
|
break; |
|
|
} |
|
|
|
|
|
transform (coords, 0, coords, 0, count); |
|
|
|
|
|
return r; |
|
|
} |
|
|
|
|
|
public int currentSegment (float[] coords) |
|
|
{ |
|
|
int r = subIterator.currentSegment (coords); |
|
|
int count = 0; |
|
|
|
|
|
switch (r) |
|
|
{ |
|
|
case SEG_CUBICTO: |
|
|
count = 3; |
|
|
break; |
|
|
|
|
|
case SEG_QUADTO: |
|
|
count = 2; |
|
|
break; |
|
|
|
|
|
case SEG_LINETO: |
|
|
case SEG_MOVETO: |
|
|
count = 1; |
|
|
break; |
|
|
|
|
|
default: |
|
|
// Error. But how to report? |
|
|
case SEG_CLOSE: |
|
|
break; |
|
|
} |
|
|
|
|
|
transform (coords, 0, coords, 0, count); |
|
|
|
|
|
return r; |
|
|
} |
|
|
|
|
|
public int getWindingRule () |
|
|
{ |
|
|
return subIterator.getWindingRule (); |
|
|
} |
|
|
|
|
|
public boolean isDone () |
|
|
{ |
|
|
return subIterator.isDone (); |
|
|
} |
|
|
|
|
|
public void next () |
|
|
{ |
|
|
subIterator.next (); |
|
|
} |
|
|
} |
|
|
|
|
600 |
private double m00, m01, m02; |
private double m00, m01, m02; |
601 |
private double m10, m11, m12; |
private double m10, m11, m12; |
602 |
private int type; |
private int type; |