The getPathIterator()
cited should return only SEG_MOVETO
, SEG_LINETO
, and SEG_CLOSE
segment types. If your Shape
has no other segment types, e.g. SEG_CUBICTO
or SEG_QUADTO
, the flatness
is irrelevant. As a concrete example, the Rectangle2D
implementation specifies that "Since rectangles are already flat, the flatness parameter is ignored."
Can't figure out what flattnes parameter does in PathIterator?
-
09-03-2022 - |
Question
I am writing my own PathIterator
implementation.
Currently I implemented method with flatness with flatness-less one:
@Override
public PathIterator getPathIterator(AffineTransform at, double flatness) {
return getPathIterator(at);
}
i.e. I am ignoring it.
What is the simplest way to work with flatness
parameter?
My current iterator gives a series of parallel vertical lines (not connected between). How important for me to implement flatness-aware version of the iterator? Where is it used?
No correct solution
OTHER TIPS
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow