FlatteningPathIterator class returns a flattened view of
another PathIterator object. Other Shape
classes can use this class to provide flattening behavior for their paths
without having to perform the interpolation calculations themselves.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv float | |
| pack-priv float | |
| pack-priv boolean | |
| pack-priv static final int | |
| pack-priv volatile float[] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int[] | |
| pack-priv int | |
| pack-priv float | |
| pack-priv float | |
| pack-priv float | |
| pack-priv PathIterator |
| Access | Constructor and Description |
|---|---|
| public | FlatteningPathIterator(PathIterator
the original unflattened path being iterated over src, float the maximum allowable distance between the
control points and the flattened curve flatness)Constructs a new |
| public | FlatteningPathIterator(PathIterator
the original unflattened path being iterated over src, float the maximum allowable distance between the
control points and the flattened curve flatness, int the maximum number of recursive subdivisions
allowed for any curved segment limit)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the path segment type of the current path segment.an array that holds the data returned from
this method coords)Implements com. Returns the coordinates and type of the current path segment in the iteration. |
| pack-priv void | |
| public float | Returns: the flatness of thisFlatteningPathIterator.Returns the flatness of this iterator. |
| public int | Returns: the recursion limit of thisFlatteningPathIterator.Returns the recursion limit of this iterator. |
| public int | Returns: the winding rule of the original unflattened path being iterated over.Implements com. Returns the winding rule for determining the interior of the path. |
| public boolean | Returns: true if all the segments have
been read; false otherwise.Implements com. Tests if the iteration is complete. |
| public void | next()
Implements com. Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction. |
| private void |
| curx | back to summary |
|---|---|
| pack-priv float curx | |
| cury | back to summary |
|---|---|
| pack-priv float cury | |
| done | back to summary |
|---|---|
| pack-priv boolean done | |
| GROW_SIZE | back to summary |
|---|---|
| pack-priv static final int GROW_SIZE | |
| hold | back to summary |
|---|---|
| pack-priv volatile float[] hold | |
| holdEnd | back to summary |
|---|---|
| pack-priv int holdEnd | |
| holdIndex | back to summary |
|---|---|
| pack-priv int holdIndex | |
| holdType | back to summary |
|---|---|
| pack-priv int holdType | |
| levelIndex | back to summary |
|---|---|
| pack-priv int levelIndex | |
| levels | back to summary |
|---|---|
| pack-priv int[] levels | |
| limit | back to summary |
|---|---|
| pack-priv int limit | |
| movx | back to summary |
|---|---|
| pack-priv float movx | |
| movy | back to summary |
|---|---|
| pack-priv float movy | |
| squareflat | back to summary |
|---|---|
| pack-priv float squareflat | |
| src | back to summary |
|---|---|
| pack-priv PathIterator src | |
| FlatteningPathIterator | back to summary |
|---|---|
| public FlatteningPathIterator(PathIterator src, float flatness) Constructs a new
| |
| FlatteningPathIterator | back to summary |
|---|---|
| public FlatteningPathIterator(PathIterator src, float flatness, int limit) Constructs a new
| |
| currentSegment | back to summary |
|---|---|
| public int currentSegment(float[] coords) Implements com. Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, or SEG_CLOSE. 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. SEG_MOVETO and SEG_LINETO types return one point, and SEG_CLOSE does not return any points.
| |
| ensureHoldCapacity | back to summary |
|---|---|
| pack-priv void ensureHoldCapacity(int want) | |
| getFlatness | back to summary |
|---|---|
| public float getFlatness() Returns the flatness of this iterator.
| |
| getRecursionLimit | back to summary |
|---|---|
| public int getRecursionLimit() Returns the recursion limit of this iterator.
| |
| getWindingRule | back to summary |
|---|---|
| public int getWindingRule() Implements com. Returns the winding rule for determining the interior of the path.
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements com. Tests if the iteration is complete.
| |
| next | back to summary |
|---|---|
| public void next() Implements com. Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
| |
| next | back to summary |
|---|---|
| private void next(boolean doNext) | |