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 double | |
| pack-priv double | |
| pack-priv boolean | |
| pack-priv static final int | |
| pack-priv double[] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int[] | |
| pack-priv int | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv PathIterator |
| Access | Constructor and Description |
|---|---|
| public | FlatteningPathIterator(PathIterator
the original unflattened path being iterated over src, double 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, double 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 java. Returns the coordinates and type of the current path segment in the iteration. |
| public int | Returns: the path segment type of the current path segment.an array that holds the data returned from
this method coords)Implements java. Returns the coordinates and type of the current path segment in the iteration. |
| pack-priv void | |
| public double | 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 java. 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 java. Tests if the iteration is complete. |
| public void | next()
Implements java. 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 double curx | |
| cury | back to summary |
|---|---|
| pack-priv double 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 double[] 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 double movx | |
| movy | back to summary |
|---|---|
| pack-priv double movy | |
| squareflat | back to summary |
|---|---|
| pack-priv double squareflat | |
| src | back to summary |
|---|---|
| pack-priv PathIterator src | |
| FlatteningPathIterator | back to summary |
|---|---|
| public FlatteningPathIterator(PathIterator src, double flatness) Constructs a new
| |
| FlatteningPathIterator | back to summary |
|---|---|
| public FlatteningPathIterator(PathIterator src, double flatness, int limit) Constructs a new
| |
| currentSegment | back to summary |
|---|---|
| public int currentSegment(float[] coords) Implements java. 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.
| |
| currentSegment | back to summary |
|---|---|
| public int currentSegment(double[] coords) Implements java. 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 double 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 double 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 double 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 java. Returns the winding rule for determining the interior of the path.
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Tests if the iteration is complete.
| |
| next | back to summary |
|---|---|
| public void next() Implements java. 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) | |