public class CachedPathIteratorFactory.CachedPathIterator extends Object implements PathIterator
Class that allows us to iterate over a path multiple times
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO| Modifier and Type | Method and Description |
|---|---|
int |
currentSegment(double[] coords) |
int |
currentSegment(float[] coords) |
int |
currentSegment(float[] coords,
float length)
Returns the current segment up to certain length.
|
void |
getCurrentSegmentEnd(float[] point)
Returns the point where the current segment ends
|
float |
getCurrentSegmentLength() |
float |
getTotalLength()
Returns the total length of the path
|
int |
getWindingRule() |
boolean |
isDone() |
void |
jumpToSegment(float length)
Restarts the iterator and jumps all the segments of this path up to the length value.
|
void |
next() |
public float getCurrentSegmentLength()
public int getWindingRule()
getWindingRule in interface PathIteratorpublic boolean isDone()
isDone in interface PathIteratorpublic void next()
next in interface PathIteratorpublic int currentSegment(float[] coords)
currentSegment in interface PathIteratorpublic int currentSegment(double[] coords)
currentSegment in interface PathIteratorpublic void getCurrentSegmentEnd(float[] point)
Returns the point where the current segment ends
public void jumpToSegment(float length)
Restarts the iterator and jumps all the segments of this path up to the length value.
public int currentSegment(float[] coords,
float length)
Returns the current segment up to certain length. If the current segment is shorter than length, then the whole segment is returned. The segment coordinates are copied into the coords array.
public float getTotalLength()
Returns the total length of the path