ShapePair that represents the space between
two concentric, non-intersecting Shapes. The pair of shapes could also be
represented by a regular Path2D by simply concatenating the two
shapes and using a WIND_EVEN_ODD winding rule. (Note that a
WIND_NON_ZERO winding rule could be used if the two shapes have
opposite windings, but that cannot be guaranteed without further inspection
of the two shapes and the WIND_NON_ZERO rule works fine without
that restriction.)
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | contains(float x, float y)
Implements abstract com. Tests if the specified coordinates are inside the boundary of the
|
| public boolean | contains(float x, float y, float w, float h)
Implements abstract com. Tests if the interior of the |
| public Shape | copy()
Implements abstract com. Returns a new copy of this |
| public RectBounds | getBounds()
Implements abstract com. Note that there is no guarantee that the returned
|
| public int | getCombinationType()
Implements abstract com. Returns the method with which to combine the two shapes. |
| public Shape | getInnerShape()
Implements abstract com. Returns the inner |
| public Shape | getOuterShape()
Implements abstract com. Returns the outer |
| public PathIterator | getPathIterator(BaseTransform tx)
Implements abstract com. Returns an iterator object that iterates along the
|
| public PathIterator | getPathIterator(BaseTransform tx, float flatness)
Implements abstract com. Returns an iterator object that iterates along the |
| public boolean | intersects(float x, float y, float w, float h)
Implements abstract com. Tests if the interior of the |
| inner | back to summary |
|---|---|
| private final Shape inner | |
| outer | back to summary |
|---|---|
| private final Shape outer | |
| ConcentricShapePair | back to summary |
|---|---|
| public ConcentricShapePair(Shape outer, Shape inner) | |
| contains | back to summary |
|---|---|
| public boolean contains(float x, float y) Implements abstract com. Doc from com. Tests if the specified coordinates are inside the boundary of the
| |
| contains | back to summary |
|---|---|
| public boolean contains(float x, float y, float w, float h) Implements abstract com. Doc from com. Tests if the interior of the
The
Shapes this method might
return false even though the Shape contains
the rectangular area.
The Area class performs
more accurate geometric computations than most
Shape objects and therefore can be used if a more precise
answer is required.
| |
| copy | back to summary |
|---|---|
| public Shape copy() Implements abstract com. Doc from com. Returns a new copy of this
| |
| getBounds | back to summary |
|---|---|
| public RectBounds getBounds() Implements abstract com. Doc from com. Note that there is no guarantee that the returned
| |
| getCombinationType | back to summary |
|---|---|
| public int getCombinationType() Implements abstract com. Doc from com. Returns the method with which to combine the two shapes.
For now, only
| |
| getInnerShape | back to summary |
|---|---|
| public Shape getInnerShape() Implements abstract com. Doc from com. Returns the inner
| |
| getOuterShape | back to summary |
|---|---|
| public Shape getOuterShape() Implements abstract com. Doc from com. Returns the outer
| |
| getPathIterator | back to summary |
|---|---|
| public PathIterator getPathIterator(BaseTransform tx) Implements abstract com. Doc from com. Returns an iterator object that iterates along the
Each call to this method returns a fresh
It is recommended, but not guaranteed, that objects
implementing the
| |
| getPathIterator | back to summary |
|---|---|
| public PathIterator getPathIterator(BaseTransform tx, float flatness) Implements abstract com. Doc from com. Returns an iterator object that iterates along the Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator.
If an optional
The amount of subdivision of the curved segments is controlled
by the
Each call to this method returns a fresh
It is recommended, but not guaranteed, that objects
implementing the
| |
| intersects | back to summary |
|---|---|
| public boolean intersects(float x, float y, float w, float h) Implements abstract com. Doc from com. Tests if the interior of the
The
Shapes this method might
return true even though the rectangular area does not
intersect the Shape.
The Area class performs
more accurate computations of geometric intersection than most
Shape objects and therefore can be used if a more precise
answer is required.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv PathIterator | |
| pack-priv PathIterator |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | currentSegment(float[] coords)
Implements com. Returns the coordinates and type of the current path segment in the iteration. |
| public int | getWindingRule()
Implements com. Returns the winding rule for determining the interior of the path. |
| public boolean | |
| public void | next()
Implements com. 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. |
| inner | back to summary |
|---|---|
| pack-priv PathIterator inner | |
| outer | back to summary |
|---|---|
| pack-priv PathIterator outer | |
| PairIterator | back to summary |
|---|---|
| pack-priv PairIterator(PathIterator outer, PathIterator inner) | |
| currentSegment | back to summary |
|---|---|
| public int currentSegment(float[] coords) Implements com. Doc from com. 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, SEG_QUADTO, SEG_CUBICTO, 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 returns one point, SEG_QUADTO returns two points, SEG_CUBICTO returns 3 points and SEG_CLOSE does not return any points.
| |
| getWindingRule | back to summary |
|---|---|
| public int getWindingRule() Implements com. Doc from com. Returns the winding rule for determining the interior of the path.
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements com. Doc from com. Tests if the iteration is complete.
| |
| next | back to summary |
|---|---|
| public void next() Implements com. Doc from com. 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.
| |