static final class TransformedShape.Translate extends TransformedShape
TransformedShape.General, TransformedShape.Translate| Modifier and Type | Field and Description |
|---|---|
private BaseTransform |
cachedTx |
private float |
tx |
private float |
ty |
delegateOUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP, RECT_INTERSECTS| Constructor and Description |
|---|
Translate(Shape delegate,
float tx,
float ty) |
| Modifier and Type | Method and Description |
|---|---|
BaseTransform |
adjust(BaseTransform transform)
Returns a new transform that represents the specified transform with
the transform of this
TransformedShape concatenated. |
boolean |
contains(float x,
float y)
Tests if the specified coordinates are inside the boundary of the
Shape. |
boolean |
contains(float x,
float y,
float w,
float h)
Tests if the interior of the
Shape entirely contains
the specified rectangular area. |
RectBounds |
getBounds()
Note that there is no guarantee that the returned
RectBounds is the smallest bounding box that encloses
the Shape, only that the Shape lies
entirely within the indicated RectBounds. |
BaseTransform |
getTransformNoClone() |
boolean |
intersects(float x,
float y,
float w,
float h)
Tests if the interior of the
Shape intersects the
interior of a specified rectangular area. |
copy, getDelegateNoClone, getPathIterator, getPathIterator, transformedShape, translatedShape, untransform, untransformedBoundsaccumulate, accumulateCubic, accumulateCubic, accumulateQuad, contains, contains, intersects, intersectsLine, outcode, pointCrossingsForCubic, pointCrossingsForLine, pointCrossingsForPath, pointCrossingsForQuad, rectCrossingsForCubic, rectCrossingsForLine, rectCrossingsForPath, rectCrossingsForQuadprivate final float tx
private final float ty
private BaseTransform cachedTx
public Translate(Shape delegate, float tx, float ty)
public BaseTransform getTransformNoClone()
getTransformNoClone in class TransformedShapepublic BaseTransform adjust(BaseTransform transform)
TransformedShapeTransformedShape concatenated.adjust in class TransformedShapetransform - the specified contextual transformpublic RectBounds getBounds()
ShapeRectBounds is the smallest bounding box that encloses
the Shape, only that the Shape lies
entirely within the indicated RectBounds.getBounds in class TransformedShapeRectBoundspublic boolean contains(float x,
float y)
ShapeShape.contains in class TransformedShapex - the specified X coordinate to be testedy - the specified Y coordinate to be testedtrue if the specified coordinates are inside
the Shape boundary; false
otherwise.public boolean intersects(float x,
float y,
float w,
float h)
ShapeShape intersects the
interior of a specified rectangular area.
The rectangular area is considered to intersect the Shape
if any point is contained in both the interior of the
Shape and the specified rectangular area.
The Shape.intersects() method allows a Shape
implementation to conservatively return true when:
Shape intersect, but
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.intersects in class TransformedShapex - the X coordinate of the upper-left corner
of the specified rectangular areay - the Y coordinate of the upper-left corner
of the specified rectangular areaw - the width of the specified rectangular areah - the height of the specified rectangular areatrue if the interior of the Shape and
the interior of the rectangular area intersect, or are
both highly likely to intersect and intersection calculations
would be too expensive to perform; false otherwise.public boolean contains(float x,
float y,
float w,
float h)
ShapeShape entirely contains
the specified rectangular area. All coordinates that lie inside
the rectangular area must lie within the Shape for the
entire rectanglar area to be considered contained within the
Shape.
The Shape.contains() method allows a Shape
implementation to conservatively return false when:
intersect method returns true and
Shape entirely contains the rectangular area are
prohibitively expensive.
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.contains in class TransformedShapex - the X coordinate of the upper-left corner
of the specified rectangular areay - the Y coordinate of the upper-left corner
of the specified rectangular areaw - the width of the specified rectangular areah - the height of the specified rectangular areatrue if the interior of the Shape
entirely contains the specified rectangular area;
false otherwise or, if the Shape
contains the rectangular area and the
intersects method returns true
and the containment calculations would be too expensive to
perform.Shape.intersects(float, float, float, float)