![]() |
|
Contents |
Public Member Functions | |
| FlatteningPathIterator (PathIterator path, double flatness) | |
| FlatteningPathIterator (PathIterator path, double flatness, int limit) | |
| double | getFlatness () |
| int | getRecursionLimit () |
| int | getWindingRule () |
| boolean | isDone () |
| void | next () |
| int | currentSegment (float[] coords) |
| int | currentSegment (double[] coords) |
Package Functions | |
| void | evaluate () |
| Calculates flat path points for current segment of the source shape. | |
Package Attributes | |
| int | bufType |
| The type of current segment to be flat. | |
| int | bufLimit |
| The curve subdivision limit. | |
| int | bufSize |
| The current points buffer size. | |
| int | bufIndex |
| The inner cursor position in points buffer. | |
| int | bufSubdiv |
| The current subdivision count. | |
| double | buf [] |
| The points buffer. | |
| boolean | bufEmpty = true |
| The indicator of empty points buffer. | |
| PathIterator | p |
| The source PathIterator. | |
| double | flatness |
| The flatness of new path. | |
| double | flatness2 |
| The square of flatness. | |
| double | px |
| The x coordinate of previous path segment. | |
| double | py |
| The y coordinate of previous path segment. | |
| double | coords [] = new double[6] |
| The tamporary buffer for getting points from PathIterator. | |
Static Private Attributes | |
| static final int | BUFFER_SIZE = 16 |
| The default points buffer size. | |
| static final int | BUFFER_LIMIT = 16 |
| The default curve subdivision limit. | |
| static final int | BUFFER_CAPACITY = 16 |
| The points buffer capacity. | |
| FlatteningPathIterator | ( | PathIterator | path, | |
| double | flatness | |||
| ) |
| FlatteningPathIterator | ( | PathIterator | path, | |
| double | flatness, | |||
| int | limit | |||
| ) |
| double getFlatness | ( | ) |
| int getRecursionLimit | ( | ) |
| int getWindingRule | ( | ) |
Implements PathIterator.
| boolean isDone | ( | ) |
Implements PathIterator.
| void evaluate | ( | ) | [package] |
Calculates flat path points for current segment of the source shape.
Line segment is flat by itself. Flatness of quad and cubic curves evaluated by getFlatnessSq() method. Curves subdivided until current flatness is bigger than user defined and subdivision limit isn't exhausted. Single source segment translated to series of buffer points. The less flatness the bigger serries. Every currentSegment() call extract one point from the buffer. When series completed evaluate() takes next source shape segment.
| void next | ( | ) |
Implements PathIterator.
| int currentSegment | ( | float[] | coords | ) |
Implements PathIterator.
| int currentSegment | ( | double[] | coords | ) |
Implements PathIterator.
final int BUFFER_SIZE = 16 [static, private] |
The default points buffer size.
final int BUFFER_LIMIT = 16 [static, private] |
The default curve subdivision limit.
final int BUFFER_CAPACITY = 16 [static, private] |
The points buffer capacity.
int bufType [package] |
The type of current segment to be flat.
int bufLimit [package] |
The curve subdivision limit.
int bufSize [package] |
The current points buffer size.
int bufIndex [package] |
The inner cursor position in points buffer.
int bufSubdiv [package] |
The current subdivision count.
double buf[] [package] |
The points buffer.
boolean bufEmpty = true [package] |
The indicator of empty points buffer.
PathIterator p [package] |
The source PathIterator.
double flatness [package] |
The flatness of new path.
double flatness2 [package] |
The square of flatness.
double px [package] |
The x coordinate of previous path segment.
double py [package] |
The y coordinate of previous path segment.
double coords[] = new double[6] [package] |
The tamporary buffer for getting points from PathIterator.