Package icyllis.arc3d.core
Interface PathIterator
public interface PathIterator
Iterates
Path
elements.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The fill rule constant for specifying an even-odd rule for determining the interior of a path.
The even-odd rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments an odd number of times.static final int
The fill rule constant for specifying a non-zero rule for determining the interior of a path.
The non-zero rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments a different number of times in the counter-clockwise direction than the clockwise direction.static final int
Primitive commands of path segments.static final int
Primitive commands of path segments.static final int
Primitive commands of path segments.static final int
Primitive commands of path segments.static final int
Primitive commands of path segments.static final int
Primitive commands of path segments. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the filling rule for determining the interior of the path.int
next
(float[] coords, int offset) Returns next verb, and advances iterator.
-
Field Details
-
FILL_NON_ZERO
static final int FILL_NON_ZEROThe fill rule constant for specifying a non-zero rule for determining the interior of a path.
The non-zero rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments a different number of times in the counter-clockwise direction than the clockwise direction.- See Also:
-
FILL_EVEN_ODD
static final int FILL_EVEN_ODDThe fill rule constant for specifying an even-odd rule for determining the interior of a path.
The even-odd rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments an odd number of times.- See Also:
-
VERB_MOVE
static final int VERB_MOVEPrimitive commands of path segments.- See Also:
-
VERB_LINE
static final int VERB_LINEPrimitive commands of path segments.- See Also:
-
VERB_QUAD
static final int VERB_QUADPrimitive commands of path segments.- See Also:
-
VERB_CUBIC
static final int VERB_CUBICPrimitive commands of path segments.- See Also:
-
VERB_CLOSE
static final int VERB_CLOSEPrimitive commands of path segments.- See Also:
-
VERB_DONE
static final int VERB_DONEPrimitive commands of path segments.- See Also:
-
-
Method Details
-
getFillRule
int getFillRule()Returns the filling rule for determining the interior of the path.- Returns:
- the winding rule.
- See Also:
-
next
int next(float[] coords, int offset) Returns next verb, and advances iterator. If there are no more elements, returnsVERB_DONE
.Zero to three points are stored in coords, depending on the command type.
A float array of length >= 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates.
- MOVE returns 1 point
- LINE returns 1 point
- QUAD returns 2 points
- CUBIC returns 3 points
- CLOSE does not return any points
- Parameters:
coords
- array for point data describing returned verb, can be null- Returns:
- next verb
-