There can be many kinds of span iterators used in the rendering pipeline, the most basic being an iterator that scan converts a path defined by any PathIterator, or an nested iterator which intersects another iterator's spans with a clip region. Other iterators can be created for scan converting some of the primitive shapes more explicitly for speed or quality.
| Modifier and Type | Method and Description |
|---|---|
| public long | getNativeIterator()
This method returns a native pointer to a function block that can be used by a native method to perform the same iteration cycle that the above methods provide while avoiding upcalls to the Java object. |
| public void | getPathBox(int[] pathbox)
This method returns the bounding box of the spans that the iterator will be returning. |
| public void | intersectClipBox(int lox, int loy, int hix, int hiy)
This method constrains the spans returned by nextSpan() to the rectangle whose bounds are given. |
| public boolean | |
| public void | skipDownTo(int y)
This method tells the iterator that it may skip all spans whose Y range is completely above the indicated Y coordinate. |
| getNativeIterator | back to summary |
|---|---|
| public long getNativeIterator() This method returns a native pointer to a function block that can be used by a native method to perform the same iteration cycle that the above methods provide while avoiding upcalls to the Java object. The definition of the structure whose pointer is returned by this method is defined in:
src/share/native/sun/java2d/pipe/SpanIterator.h
| |
| getPathBox | back to summary |
|---|---|
| public void getPathBox(int[] pathbox) This method returns the bounding box of the spans that the iterator will be returning. The array must be of length at least 4 and upon return, it will be filled with the values:
{PathMinX, PathMinY, PathMaxX, PathMaxY}.
| |
| intersectClipBox | back to summary |
|---|---|
| public void intersectClipBox(int lox, int loy, int hix, int hiy) This method constrains the spans returned by nextSpan() to the rectangle whose bounds are given. | |
| nextSpan | back to summary |
|---|---|
| public boolean nextSpan(int[] spanbox) This method returns the next span in the shape being iterated. The array must be of length at least 4 and upon return, it will be filled with the values:
{SpanMinX, SpanMinY, SpanMaxX, SpanMaxY}.
| |
| skipDownTo | back to summary |
|---|---|
| public void skipDownTo(int y) This method tells the iterator that it may skip all spans whose Y range is completely above the indicated Y coordinate. This method is used to provide feedback from the caller when clipping prevents the display of any data in a given Y range. Typically it will only be called when this iterator has returned a span whose MaxY coordinate is less than the indicated Y and the calling mechanism wants to avoid unnecessary iteration work. While this request could technically be ignored (i.e. a NOP), doing so could potentially cause the caller to make this callback for each span that is being skipped. | |