APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.javafx.geom

public abstract Class TransformedShape

extends Shape
Class Inheritance
Known Direct Subclasses
com.sun.javafx.geom.TransformedShape.General, com.sun.javafx.geom.TransformedShape.Translate
Imports
com.sun.javafx.geom.transform.BaseTransform, .NoninvertibleTransformException

TransformedShape objects are transformed "views" onto existing Shape objects. These objects make no attempt to clone or protect against access to the original Shape so any modifications to the original Shape will be immediately reflected in the behaviors and results of this object.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private Shape
protected final Shape
Inherited from com.sun.javafx.geom.Shape:
OUT_BOTTOMOUT_LEFTOUT_RIGHTOUT_TOPRECT_INTERSECTS

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract BaseTransform

Returns:

the concatenated transform
adjust
(BaseTransform
the specified contextual transform
tx
)

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

public boolean
contains(float x, float y)

Implements abstract com.sun.javafx.geom.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

public boolean
contains(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area.

public Shape
copy()

Implements abstract com.sun.javafx.geom.Shape.copy.

Returns a new copy of this Shape instance.

public RectBounds
getBounds()

Implements abstract com.sun.javafx.geom.Shape.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.

private Shape
public Shape
public PathIterator
getPathIterator(BaseTransform transform)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.

public PathIterator
getPathIterator(BaseTransform transform, float flatness)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

public abstract BaseTransform
public boolean
intersects(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area.

public static TransformedShape

Returns:

a transformed view of the backing Shape
transformedShape
(Shape
the backing Shape
original
,
BaseTransform
the BaseTransform to apply to all of the coordinates of the backing Shape on the fly
tx
)

Returns a Shape object backed by the specified original but with the indicated transform applied to all of its coordinates.

public static TransformedShape

Returns:

a translated view of the backing Shape
translatedShape
(Shape
the backing Shape
original
,
double
the X coordinate translation to apply to all of the coordinates of the backing Shape on the fly
tx
,
double
the Y coordinate translation to apply to all of the coordinates of the backing Shape on the fly
ty
)

Returns a Shape object backed by the specified original but with the indicated translation applied to all of its coordinates.

protected Point2D
untransform(float x, float y)

protected BaseBounds
untransformedBounds(float x, float y, float w, float h)

Inherited from com.sun.javafx.geom.Shape:
accumulateaccumulateCubicaccumulateCubicaccumulateQuadcontainscontainsintersectsintersectsLineoutcodepointCrossingsForCubicpointCrossingsForLinepointCrossingsForPathpointCrossingsForQuadrectCrossingsForCubicrectCrossingsForLinerectCrossingsForPathrectCrossingsForQuad

Field Detail

cachedTransformedShapeback to summary
private Shape cachedTransformedShape
delegateback to summary
protected final Shape delegate

Constructor Detail

TransformedShapeback to summary
protected TransformedShape(Shape delegate)

Method Detail

adjustback to summary
public abstract BaseTransform adjust(BaseTransform tx)

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

Parameters
tx:BaseTransform

the specified contextual transform

Returns:BaseTransform

the concatenated transform

containsback to summary
public boolean contains(float x, float y)

Implements abstract com.sun.javafx.geom.Shape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

Annotations
@Override
containsback to summary
public boolean contains(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the interior of the Shape 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:

  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the rectangular area are prohibitively expensive.
This means that for some 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.
Annotations
@Override
copyback to summary
public Shape copy()

Implements abstract com.sun.javafx.geom.Shape.copy.

Doc from com.sun.javafx.geom.Shape.copy.

Returns a new copy of this Shape instance.

Annotations
@Override
getBoundsback to summary
public RectBounds getBounds()

Implements abstract com.sun.javafx.geom.Shape.getBounds.

Doc from com.sun.javafx.geom.Shape.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.

Annotations
@Override
getCachedTransformedShapeback to summary
private Shape getCachedTransformedShape()
getDelegateNoCloneback to summary
public Shape getDelegateNoClone()
getPathIteratorback to summary
public PathIterator getPathIterator(BaseTransform transform)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Doc from com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline. If an optional BaseTransform is specified, the coordinates returned in the iteration are transformed accordingly.

Each call to this method returns a fresh PathIterator object that traverses the geometry of the Shape object independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Annotations
@Override
getPathIteratorback to summary
public PathIterator getPathIterator(BaseTransform transform, float flatness)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Doc from com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator.

If an optional BaseTransform is specified, the coordinates returned in the iteration are transformed accordingly.

The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. Note that a limit on the accuracy of the flattened path might be silently imposed, causing very small flattening parameters to be treated as larger values. This limit, if there is one, is defined by the particular implementation that is used.

Each call to this method returns a fresh PathIterator object that traverses the Shape object geometry independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Annotations
@Override
getTransformNoCloneback to summary
public abstract BaseTransform getTransformNoClone()
intersectsback to summary
public boolean intersects(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.intersects.

Doc from com.sun.javafx.geom.Shape.intersects.

Tests if the interior of the Shape 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:

  • there is a high probability that the rectangular area and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that for some 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.
Annotations
@Override
transformedShapeback to summary
public static TransformedShape transformedShape(Shape original, BaseTransform tx)

Returns a Shape object backed by the specified original but with the indicated transform applied to all of its coordinates. The original Shape is not cloned or copied by this factory method so any changes to the original object will be immediately reflected in the methods of the return value. The original BaseTransform object is, however, copied since transform objects are far more likely to be scratch objects and a lot less costly to clone. In addition, the underlying implementation may dig some values out of the transform and then discard the actual object in some cases for optimization purposes. Since that would make those cases independent of future changes to the transform, we copy the transform so that all return values from this method are independent of further mutations to the transform object.

Parameters
original:Shape

the backing Shape

tx:BaseTransform

the BaseTransform to apply to all of the coordinates of the backing Shape on the fly

Returns:TransformedShape

a transformed view of the backing Shape

translatedShapeback to summary
public static TransformedShape translatedShape(Shape original, double tx, double ty)

Returns a Shape object backed by the specified original but with the indicated translation applied to all of its coordinates. The original Shape is not cloned or copied by this factory method so any changes to the original object will be immediately reflected in the methods of the return value.

Parameters
original:Shape

the backing Shape

tx:double

the X coordinate translation to apply to all of the coordinates of the backing Shape on the fly

ty:double

the Y coordinate translation to apply to all of the coordinates of the backing Shape on the fly

Returns:TransformedShape

a translated view of the backing Shape

untransformback to summary
protected Point2D untransform(float x, float y)
untransformedBoundsback to summary
protected BaseBounds untransformedBounds(float x, float y, float w, float h)
com.sun.javafx.geom back to summary

pack-priv final Class TransformedShape.General

extends TransformedShape
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv BaseTransform
Inherited from com.sun.javafx.geom.TransformedShape:
delegate

Constructor Summary

AccessConstructor and Description
pack-priv
General(Shape delegate, BaseTransform transform)

Method Summary

Modifier and TypeMethod and Description
public BaseTransform
adjust(BaseTransform transform)

Implements abstract com.sun.javafx.geom.TransformedShape.adjust.

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

public BaseTransform
Inherited from com.sun.javafx.geom.TransformedShape:
containscontainscopygetBoundsgetDelegateNoClonegetPathIteratorgetPathIteratorintersectstransformedShapetranslatedShapeuntransformuntransformedBounds

Field Detail

transformback to summary
pack-priv BaseTransform transform

Constructor Detail

Generalback to summary
pack-priv General(Shape delegate, BaseTransform transform)

Method Detail

adjustback to summary
public BaseTransform adjust(BaseTransform transform)

Implements abstract com.sun.javafx.geom.TransformedShape.adjust.

Doc from com.sun.javafx.geom.TransformedShape.adjust.

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

Annotations
@Override
getTransformNoCloneback to summary
public BaseTransform getTransformNoClone()

Implements abstract com.sun.javafx.geom.TransformedShape.getTransformNoClone.

Annotations
@Override
com.sun.javafx.geom back to summary

pack-priv final Class TransformedShape.Translate

extends TransformedShape
Class Inheritance

Field Summary

Modifier and TypeField and Description
private BaseTransform
private final float
private final float
Inherited from com.sun.javafx.geom.TransformedShape:
delegate

Constructor Summary

AccessConstructor and Description
public
Translate(Shape delegate, float tx, float ty)

Method Summary

Modifier and TypeMethod and Description
public BaseTransform
adjust(BaseTransform transform)

Implements abstract com.sun.javafx.geom.TransformedShape.adjust.

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

public boolean
contains(float x, float y)

Overrides com.sun.javafx.geom.TransformedShape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

public boolean
contains(float x, float y, float w, float h)

Overrides com.sun.javafx.geom.TransformedShape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area.

public RectBounds
getBounds()

Overrides com.sun.javafx.geom.TransformedShape.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.

public BaseTransform
public boolean
intersects(float x, float y, float w, float h)

Overrides com.sun.javafx.geom.TransformedShape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area.

Inherited from com.sun.javafx.geom.TransformedShape:
copygetDelegateNoClonegetPathIteratorgetPathIteratortransformedShapetranslatedShapeuntransformuntransformedBounds

Field Detail

cachedTxback to summary
private BaseTransform cachedTx
txback to summary
private final float tx
tyback to summary
private final float ty

Constructor Detail

Translateback to summary
public Translate(Shape delegate, float tx, float ty)

Method Detail

adjustback to summary
public BaseTransform adjust(BaseTransform transform)

Implements abstract com.sun.javafx.geom.TransformedShape.adjust.

Doc from com.sun.javafx.geom.TransformedShape.adjust.

Returns a new transform that represents the specified transform with the transform of this TransformedShape concatenated.

Annotations
@Override
containsback to summary
public boolean contains(float x, float y)

Overrides com.sun.javafx.geom.TransformedShape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

Annotations
@Override
containsback to summary
public boolean contains(float x, float y, float w, float h)

Overrides com.sun.javafx.geom.TransformedShape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the interior of the Shape 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:

  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the rectangular area are prohibitively expensive.
This means that for some 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.
Annotations
@Override
getBoundsback to summary
public RectBounds getBounds()

Overrides com.sun.javafx.geom.TransformedShape.getBounds.

Doc from com.sun.javafx.geom.Shape.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.

Annotations
@Override
getTransformNoCloneback to summary
public BaseTransform getTransformNoClone()

Implements abstract com.sun.javafx.geom.TransformedShape.getTransformNoClone.

Annotations
@Override
intersectsback to summary
public boolean intersects(float x, float y, float w, float h)

Overrides com.sun.javafx.geom.TransformedShape.intersects.

Doc from com.sun.javafx.geom.Shape.intersects.

Tests if the interior of the Shape 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:

  • there is a high probability that the rectangular area and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that for some 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.
Annotations
@Override