java.awt.geom
public class FlatteningPathIterator extends Object implements PathIterator
The accuracy of the approximation is determined by two parameters:
Memory Efficiency: The memory consumption grows linearly with the recursion limit. Neither the flatness parameter nor the number of segments in the flattened path will affect the memory consumption.
Thread Safety: Multiple threads can safely work on separate instances of this class. However, multiple threads should not concurrently access the same instance, as no synchronization is performed.
Since: 1.2
See Also: Implementation Note
Constructor Summary | |
---|---|
FlatteningPathIterator(PathIterator src, double flatness)
Constructs a new PathIterator for approximating an input
PathIterator with straight lines. | |
FlatteningPathIterator(PathIterator src, double flatness, int limit)
Constructs a new PathIterator for approximating an input
PathIterator with straight lines. |
Method Summary | |
---|---|
int | currentSegment(double[] coords) |
int | currentSegment(float[] coords) |
double | getFlatness()
Returns the maximally acceptable flatness.
|
int | getRecursionLimit()
Returns the maximum number of recursive curve subdivisions. |
int | getWindingRule() |
boolean | isDone() |
void | next() |
There will not be more than 10 nested recursion steps, which
means that a single SEG_QUADTO
or
SEG_CUBICTO
segment is approximated by at most
210 = 1024 straight lines.
See Also: getFlatness getFlatness