ShapePair for general shapes
and combination types. This class can represent the combination and
perform basic operations like bounds, intersects and contains, but
it cannot supply a PathIterator for the result of the combination.
As a result the renderer will either have to be able to render the
combination of two shapes directly or perform some other geometry
computation of its own to achieve the subtraction or intersection.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final Shape | |
| private final Shape |
| 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 final int | getCombinationType()
Implements abstract com. Returns the method with which to combine the two shapes. |
| public final Shape | getInnerShape()
Implements abstract com. Returns the inner |
| public final 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 |
| combinationType | back to summary |
|---|---|
| private final int combinationType | |
| inner | back to summary |
|---|---|
| private final Shape inner | |
| outer | back to summary |
|---|---|
| private final Shape outer | |
| GeneralShapePair | back to summary |
|---|---|
| public GeneralShapePair(Shape outer, Shape inner, int combinationType) | |
| 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 final 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 final Shape getInnerShape() Implements abstract com. Doc from com. Returns the inner
| |
| getOuterShape | back to summary |
|---|---|
| public final 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.
| |