public interface PathIterator
Shape,
Stroke,
FlatteningPathIterator| Modifier and Type | Field and Description |
|---|---|
static int |
SEG_CLOSE
The current segment closes a loop by an implicit line to the previous
SEG_MOVETO coordinate.
|
static int |
SEG_CUBICTO
The current segment is a cubic parametric curve (more commonly known as
a Bezier curve).
|
static int |
SEG_LINETO
The current segment is a line.
|
static int |
SEG_MOVETO
Starts a new subpath.
|
static int |
SEG_QUADTO
The current segment is a quadratic parametric curve.
|
static int |
WIND_EVEN_ODD
The even-odd winding mode: a point is internal to the shape if a ray
from the point to infinity (in any direction) crosses an odd number of
segments.
|
static int |
WIND_NON_ZERO
The non-zero winding mode: a point is internal to the shape if a ray
from the point to infinity (in any direction) crosses a different number
of segments headed clockwise than those headed counterclockwise.
|
| Modifier and Type | Method and Description |
|---|---|
int |
currentSegment(double[] coords)
Returns the coordinates of the next point(s), as well as the type of
line segment.
|
int |
currentSegment(float[] coords)
Returns the coordinates of the next point(s), as well as the type of
line segment.
|
int |
getWindingRule()
Returns the winding rule to determine which points are inside this path.
|
boolean |
isDone()
Tests if the iterator is exhausted.
|
void |
next()
Advance to the next segment in the iteration.
|
static final int WIND_EVEN_ODD
static final int WIND_NON_ZERO
static final int SEG_MOVETO
static final int SEG_LINETO
static final int SEG_QUADTO
P(t) = B(2,0)*CP + B(2,1)*P1 + B(2,2)*P2
0 <= t <= 1
B(n,m) = mth coefficient of nth degree Bernstein polynomial
= C(n,m) * t^(m) * (1 - t)^(n-m)
C(n,m) = Combinations of n things, taken m at a time
= n! / (m! * (n-m)!)
static final int SEG_CUBICTO
P(t) = B(3,0)*CP + B(3,1)*P1 + B(3,2)*P2 + B(3,3)*P3
0 <= t <= 1
B(n,m) = mth coefficient of nth degree Bernstein polynomial
= C(n,m) * t^(m) * (1 - t)^(n-m)
C(n,m) = Combinations of n things, taken m at a time
= n! / (m! * (n-m)!)
static final int SEG_CLOSE
int getWindingRule()
WIND_EVEN_ODD,
WIND_NON_ZEROboolean isDone()
void next()
NoSuchElementException - optional when isDone() is trueint currentSegment(float[] coords)
coords - the array to place the point coordinates inNullPointerException - if coords is nullArrayIndexOutOfBoundsException - if coords is too smallNoSuchElementException - optional when isDone() is trueSEG_MOVETO,
SEG_LINETO,
SEG_QUADTO,
SEG_CUBICTO,
SEG_CLOSEint currentSegment(double[] coords)
coords - the array to place the point coordinates inNullPointerException - if coords is nullArrayIndexOutOfBoundsException - if coords is too smallNoSuchElementException - optional when isDone() is trueSEG_MOVETO,
SEG_LINETO,
SEG_QUADTO,
SEG_CUBICTO,
SEG_CLOSE