Example:
Rectangle rect = new Rectangle(50,50, Color.RED);
rect.getTransforms().add(new Rotate(45,0,0)); //rotate by 45 degrees
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Transform.
Immutable transformation with performance optimizations based on Affine. |
| private abstract static class | Transform.
Lazily computed read-only boolean property implementation. |
| Modifier and Type | Field and Description |
|---|---|
| private Transform. | identity
Determines if this is currently an identity transform. |
| private EventHandlerManager | |
| private SoftReference | inverseCache
For transforms with expensive inversion we cache the inverted matrix once it is needed and computed for some operation. |
| private WeakReferenceQueue | |
| private ObjectProperty | |
| private Transform. | type2D
Determines if this is currently a 2D transform. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public final <T extends Event> void | addEventFilter(final EventType<T>
the type of the events received by the filter eventType, final EventHandler<? super T> the event filter eventFilter)Overrides default javafx. Registers an event filter for this target. |
| public final <T extends Event> void | addEventHandler(final EventType<T>
the type of the events received by the handler eventType, final EventHandler<? super T> the event handler eventHandler)Overrides default javafx. Registers an event handler for this target. |
| public static Affine | Returns: a newAffine object derived from specified parametersthe X coordinate scaling element of the 3x4 matrix mxx, double the Y coordinate shearing element of the 3x4 matrix myx, double the X coordinate shearing element of the 3x4 matrix mxy, double the Y coordinate scaling element of the 3x4 matrix myy, double the X coordinate translation element of the 3x4 matrix tx, double the Y coordinate translation element of the 3x4 matrix ty)Returns a new |
| public static Affine | Returns: a newAffine object derived from specified parametersthe X coordinate scaling element of the 3x4 matrix mxx, double the XY element of the 3x4 matrix mxy, double the XZ element of the 3x4 matrix mxz, double the X coordinate translation element of the 3x4 matrix tx, double the YX element of the 3x4 matrix myx, double the Y coordinate scaling element of the 3x4 matrix myy, double the YZ element of the 3x4 matrix myz, double the Y coordinate translation element of the 3x4 matrix ty, double the ZX element of the 3x4 matrix mzx, double the ZY element of the 3x4 matrix mzy, double the Z coordinate scaling element of the 3x4 matrix mzz, double the Z coordinate translation element of the 3x4 matrix tz)Returns a new |
| pack-priv void | |
| pack-priv abstract void | |
| public EventDispatchChain | buildEventDispatchChain(EventDispatchChain
the initial chain to build from tail)Implements javafx. Construct an event dispatch chain for this target. |
| pack-priv void | checkRequestedMAT(MatrixType
matrix type to check type)Makes sure the specified matrix type can be requested from this transform. |
| pack-priv void | |
| public Transform | Returns: a copy of this transformOverrides java. Returns a deep copy of this transform. |
| public double[] | Returns: an array containing the requested column of the requested matrix type representing this transformmatrix type whose column is to be filled in the array type, int zero-based index of the column column, double[] array into which the elements of the column are to be
stored, if it is non-null and big enough; otherwise,
a new array is created for this purpose. array)Returns an array containing a column of the transformation matrix. |
| public double[] | Returns: an array containing the requested column of the requested matrix type representing this transformmatrix type whose column is to be filled in the array type, int zero-based index of the column column)Returns an array containing a column of the transformation matrix. |
| pack-priv boolean | Returns: true if this transform is currently 2D-onlyComputes if this transform is currently a 2D transform (has no effect in the direction of Z axis). |
| pack-priv boolean | Returns: true if this transform is currently an identity transformComputes if this transform is currently an identity (has no effect in any direction). |
| public Transform | Returns: The concatenated transformtransform to be concatenated with this transform transform)Returns the concatenation of this transform and the specified transform. |
| pack-priv static Transform | |
| pack-priv static Transform | createImmutableTransform(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
|
| pack-priv static Transform | createImmutableTransform(Transform transform, double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
|
| pack-priv static Transform | |
| public Transform | |
| public Point2D | Returns: the transformed relative magnitude vector represented by aPoint2D instancevector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y)Transforms the relative magnitude vector by this transform. |
| public Point2D | Returns: the transformed relative magnitude vector represented by aPoint2D instancethe relative magnitude vector point)Transforms the relative magnitude vector represented by the specified
|
| public Point3D | Returns: the transformed relative magnitude vector represented by aPoint3D instancevector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y, double vector magnitude in the direction of the Z axis z)Transforms the relative magnitude vector by this transform. |
| public Point3D | Returns: the transformed relative magnitude vector represented by aPoint3D instancethe relative magnitude vector point)Transforms the relative magnitude vector represented by the specified
|
| pack-priv abstract BaseTransform | |
| public double | Returns: Determinant of the transformation matrixComputes determinant of the transformation matrix. |
| pack-priv void | |
| pack-priv void | fill2DArray(double[]
array to be filled with the 6 2D elements array)Core of the toArray implementation for the 2D case. |
| pack-priv void | fill3DArray(double[]
array to be filled with the 12 3D elements array)Core of the toArray implementation for the 3D case. |
| public double | Returns: value of the specified transformation matrix elementtype of matrix to get the value from type, int zero-based row number row, int zero-based column number column)Gets the specified element of the transformation matrix. |
| private int | Returns: the (if necessary fixed) srcOffHelper method for transforming arrays of points that deals with overlapping arrays. |
| private EventHandlerManager | |
| private Transform | |
| public double | Returns: the X coordinate scaling element of the 3x4 matrixGets the X coordinate scaling element of the 3x4 matrix. |
| public double | Returns: the XY coordinate element of the 3x4 matrixGets the XY coordinate element of the 3x4 matrix. |
| public double | Returns: the XZ coordinate element of the 3x4 matrixGets the XZ coordinate element of the 3x4 matrix. |
| public double | Returns: the YX coordinate element of the 3x4 matrixGets the YX coordinate element of the 3x4 matrix. |
| public double | Returns: the Y coordinate scaling element of the 3x4 matrixGets the Y coordinate scaling element of the 3x4 matrix. |
| public double | Returns: the YZ coordinate element of the 3x4 matrixGets the YZ coordinate element of the 3x4 matrix. |
| public double | Returns: the ZX coordinate element of the 3x4 matrixGets the ZX coordinate element of the 3x4 matrix. |
| public double | Returns: the ZY coordinate element of the 3x4 matrixGets the ZY coordinate element of the 3x4 matrix. |
| public double | Returns: the Z coordinate scaling element of the 3x4 matrixGets the Z coordinate scaling element of the 3x4 matrix. |
| public final EventHandler | Returns: the event handler previously set bysetOnTransformChanged
method, null if the handler is not set.Gets the onTransformChanged event handler. |
| public double | Returns: the X coordinate translation element of the 3x4 matrixGets the X coordinate translation element of the 3x4 matrix. |
| public double | Returns: the Y coordinate translation element of the 3x4 matrixGets the Y coordinate translation element of the 3x4 matrix. |
| public double | Returns: the Z coordinate translation element of the 3x4 matrixGets the Z coordinate translation element of the 3x4 matrix. |
| public final ReadOnlyBooleanProperty | |
| public Point2D | Returns: the inversely transformed relative magnitude vector represented by aPoint2D instancevector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y)Transforms the relative magnitude vector by the inverse of this transform. |
| public Point2D | Returns: the inversely transformed relative magnitude vector represented by aPoint2D instancethe relative magnitude vector point)Transforms the relative magnitude vector represented by the specified
|
| public Point3D | Returns: the inversely transformed relative magnitude vector represented by aPoint3D instancevector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y, double vector magnitude in the direction of the Z axis z)Transforms the relative magnitude vector by the inverse of this transform. |
| public Point3D | Returns: the inversely transformed relative magnitude vector represented by aPoint3D instancethe relative magnitude vector point)Transforms the relative magnitude vector represented by the specified
|
| public Point2D | Returns: the inversely transformed pointthe X coordinate of the point x, double the Y coordinate of the point y)Transforms the specified point by the inverse of this transform. |
| public Point2D | Returns: the inversely transformed pointthe point to be transformed point)Transforms the specified point by the inverse of this transform. |
| public Point3D | Returns: the inversely transformed pointthe X coordinate of the point x, double the Y coordinate of the point y, double the Z coordinate of the point z)Transforms the specified point by the inverse of this transform. |
| public Point3D | Returns: the inversely transformed pointthe point to be transformed point)Transforms the specified point by the inverse of this transform. |
| public Bounds | Returns: the inversely transformed boundsthe bounds to be transformed bounds)Transforms the specified bounds by the inverse of this transform. |
| public void | inverseTransform2DPoints(double[]
the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates. srcPts, int the offset to the first point to be transformed
in the source array srcOff, double[] the array into which the transformed point coordinates
are returned. Each point is stored as a pair of x, y
coordinates. dstPts, int the offset to the location of the first
transformed point that is stored in the destination array dstOff, int the number of points to be transformed numPts)Transforms an array of coordinates by the inverse of this transform. |
| pack-priv void | inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Core of the inverseTransform2DPoints method. |
| public void | inverseTransform3DPoints(double[]
the array containing the source point coordinates.
Each point is stored as a triplet of x, y, z coordinates. srcPts, int the offset to the first point to be transformed
in the source array srcOff, double[] the array into which the transformed point coordinates
are returned. Each point is stored as a triplet of x, y, z
coordinates. dstPts, int the offset to the location of the first
transformed point that is stored in the destination array dstOff, int the number of points to be transformed numPts)Transforms an array of floating point coordinates by the inverse of this transform. |
| pack-priv void | inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Core of the inverseTransform3DPoints method. |
| public final boolean | |
| public final boolean | |
| public final ObjectProperty | Returns: the onTransformChanged event handlerThe onTransformChanged event handler is called whenever the transform changes any of its parameters. |
| pack-priv void | |
| pack-priv void | |
| public final <T extends Event> void | removeEventFilter(final EventType<T>
the event type from which to unregister eventType, final EventHandler<? super T> the event filter eventFilter)Overrides default javafx. Unregisters a previously registered event filter from this target. |
| public final <T extends Event> void | removeEventHandler(final EventType<T>
the event type from which to unregister eventType, final EventHandler<? super T> the event handler eventHandler)Overrides default javafx. Unregisters a previously registered event handler from this target. |
| public static Rotate | Returns: the Rotate object that rotates coordinates around a pivot pointthe rotation angle angle, double the pivot x value pivotX, double the pivot y value pivotY)Returns a |
| public double[] | Returns: an array containing the requested row of the requested matrix type representing this transformmatrix type whose row is to be filled in the array type, int zero-based index of the row row, double[] array into which the elements of the row are to be
stored, if it is non-null and big enough; otherwise,
a new array is created for this purpose. array)Returns an array containing a row of the transformation matrix. |
| public double[] | Returns: an array containing the requested row of the requested matrix type representing this transformmatrix type whose row is to be filled in the array type, int zero-based index of the row row)Returns an array containing a row of the transformation matrix. |
| public static Scale | Returns: the Scale object representing a scaling transformationthe scale x value x, double the scale y value y)Returns a |
| public static Scale | Returns: the Scale object representing a scaling transformationthe scale x value x, double the scale y value y, double the pivot x value pivotX, double the pivot y value pivotY)Returns a |
| public final void | setOnTransformChanged(EventHandler<? super TransformChangedEvent>
the event handler, can be null to clear it value)Sets the onTransformChanged event handler which is called whenever the transform changes any of its parameters. |
| public static Shear | Returns: the Shear object representing a shearing transformationthe shear x value x, double the shear y value y)Returns a |
| public static Shear | Returns: the Shear object representing a shearing transformationthe shear x value x, double the shear y value y, double the pivot x value pivotX, double the pivot y value pivotY)Returns a |
| public boolean | Returns: true if the transforms are similar according to the specified criteriatransform to be compared to this transform transform, Bounds region of interest on which the two transforms are compared range, double maximum allowed distance for the results of transforming
any single point from maxDelta)range by the two transformsChecks if this transform is similar to the specified transform. |
| public double[] | Returns: an array containing the elements of the requested matrix type representing this transformmatrix type to be filled in the array type, double[] array into which the elements of the matrix are to be
stored, if it is non-null and big enough; otherwise,
a new array is created for this purpose. array)Returns an array containing the flattened transformation matrix. |
| public double[] | Returns: an array containing the elements of the requested matrix type representing this transformmatrix type to be filled in the array type)Returns an array containing the flattened transformation matrix. |
| public Point2D | Returns: the transformed pointthe X coordinate of the point x, double the Y coordinate of the point y)Transforms the specified point by this transform. |
| public Point2D | |
| public Point3D | Returns: the transformed pointthe X coordinate of the point x, double the Y coordinate of the point y, double the Z coordinate of the point z)Transforms the specified point by this transform. |
| public Point3D | |
| public Bounds | |
| public void | transform2DPoints(double[]
the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates. srcPts, int the offset to the first point to be transformed
in the source array srcOff, double[] the array into which the transformed point coordinates
are returned. Each point is stored as a pair of x, y
coordinates. dstPts, int the offset to the location of the first
transformed point that is stored in the destination array dstOff, int the number of points to be transformed numPts)Transforms an array of coordinates by this transform. |
| pack-priv void | transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Core of the transform2DPoints method. |
| public void | transform3DPoints(double[]
the array containing the source point coordinates.
Each point is stored as a triplet of x, y, z coordinates. srcPts, int the offset to the first point to be transformed
in the source array srcOff, double[] the array into which the transformed point coordinates
are returned. Each point is stored as a triplet of x, y, z
coordinates. dstPts, int the offset to the location of the first
transformed point that is stored in the destination array dstOff, int the number of points to be transformed numPts)Transforms an array of floating point coordinates by this transform. |
| pack-priv void | transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Core of the transform3DPoints method. |
| protected void | transformChanged()
This method must be called by all transforms whenever any of their parameters changes. |
| private double | Returns: distance of the transformed pointsthe other transform t, double point's X coordinate x, double point's Y coordinate y)Transforms the specified point by this transform and by the specified transform and returns distance of the result points. |
| private double | Returns: distance of the transformed pointsthe other transform t, double point's X coordinate x, double point's Y coordinate y, double point's Z coordinate z)Transforms the specified point by this transform and by the specified transform and returns distance of the result points. |
| public static Translate | Returns: the Translate object representing a translation transformationthe translate x value x, double the translate y value y)Returns a |
| public final ReadOnlyBooleanProperty | |
| pack-priv void |