Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Transform

[14:7] extends: FxObj

Wraps JavaFX Transform, the abstract base class for all node transforms (Translate, Rotate, Scale, Affine, and Shear). A Transform can be applied to any Node by adding it to that node's transforms list. This wrapper provides the shared applyTo helper for attaching a transform to a node, plus shared getters for the resulting 12 element matrix elements. Subclasses provide their own constructors. This base wrapper has none.

Methods

  • applyTo (object Target)

    Adds this transform to the given node's transforms list. The transform is applied in addition to any existing transforms on the node.

    • @p Target is a Node (or any wrapper that holds a Node in obj) to attach to.
    • @r this object
  • removeFrom (object Target)

    Removes this transform from the given node's transforms list.

    • @p Target is a Node previously passed to applyTo.
    • @r this object
  • getMxx ()

    Returns matrix element [0, 0].

    • @r A double with the Mxx value.
  • getMxy ()

    Returns matrix element [0, 1].

    • @r A double with the Mxy value.
  • getMxz ()

    Returns matrix element [0, 2].

    • @r A double with the Mxz value.
  • getTx ()

    Returns the translation X component (matrix element [0, 3]).

    • @r A double with the Tx value.
  • getMyx ()

    Returns matrix element [1, 0].

    • @r A double with the Myx value.
  • getMyy ()

    Returns matrix element [1, 1].

    • @r A double with the Myy value.
  • getMyz ()

    Returns matrix element [1, 2].

    • @r A double with the Myz value.
  • getTy ()

    Returns the translation Y component (matrix element [1, 3]).

    • @r A double with the Ty value.
  • getMzx ()

    Returns matrix element [2, 0].

    • @r A double with the Mzx value.
  • getMzy ()

    Returns matrix element [2, 1].

    • @r A double with the Mzy value.
  • getMzz ()

    Returns matrix element [2, 2].

    • @r A double with the Mzz value.
  • getTz ()

    Returns the translation Z component (matrix element [2, 3]).

    • @r A double with the Tz value.
  • getElement (string Type, int Row, int Col)

    Returns the matrix element at the given row and column for the named matrix type.

    • @p Type is a string with a javafx.scene.transform.MatrixType constant name (e.g., MT_3D_3x4).
    • @p Row is an int with the matrix row.
    • @p Col is an int with the matrix column.
    • @r A double with the matrix element.
  • determinant ()

    Returns the determinant of the matrix.

    • @r A double with the determinant.
  • isType2D ()

    Returns whether this transform is a 2D-only transform.

    • @r A bool; true when the transform is purely 2D.
  • type2DProperty ()

    Returns the read-only property backing the 2D-type flag.

    • @r A ReadOnlyBooleanProperty AJO.
  • isIdentity ()

    Returns whether this transform is the identity transform.

    • @r A bool; true when the transform is identity.
  • identityProperty ()

    Returns the read-only property backing the identity flag.

    • @r A ReadOnlyBooleanProperty AJO.
  • similarTo (object Other, object Bounds, double Tolerance)

    Returns whether this transform is similar to the other transform within the given bounds and tolerance.

    • @p Other is a Transform wrapper to compare against.
    • @p Bounds is an AJO around javafx.geometry.Bounds used as the reference area.
    • @p Tolerance is a double with the comparison tolerance.
    • @r A bool; true when the two transforms are similar.
  • toArray (string Type)

    Returns the matrix as a newly allocated double array of the given matrix type.

    • @p Type is a string with a javafx.scene.transform.MatrixType constant name.
    • @r An AJO around a Java double[] with the matrix elements in row-major order.
  • row (string Type, int Row)

    Returns the specified matrix row as a newly allocated double array.

    • @p Type is a string with a javafx.scene.transform.MatrixType constant name.
    • @p Row is an int with the matrix row.
    • @r An AJO around a Java double[] with the row elements.
  • column (string Type, int Col)

    Returns the specified matrix column as a newly allocated double array.

    • @p Type is a string with a javafx.scene.transform.MatrixType constant name.
    • @p Col is an int with the matrix column.
    • @r An AJO around a Java double[] with the column elements.
  • createConcatenation (object Tx)

    Returns the concatenation of this transform with the supplied Transform.

    • @p Tx is a Transform wrapper to concatenate with.
    • @r An AJO around the resulting javafx.scene.transform.Transform.
  • createInverse ()

    Returns the inverse of this transform. The underlying Java call throws NonInvertibleTransformException when the matrix is not invertible; the exception surfaces as a regular Aussom exception.

    • @r An AJO around the inverse javafx.scene.transform.Transform.
  • transform (double X, double Y)

    Transforms a 2D point through this transform.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • transformPoint2D (object Pt)

    Transforms a Point2D AJO through this transform.

    • @p Pt is an AJO around javafx.geometry.Point2D.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • transform3D (double X, double Y, double Z)

    Transforms a 3D point through this transform.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @p Z is a double with the input Z coordinate.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • transformPoint3D (object Pt)

    Transforms a Point3D AJO through this transform.

    • @p Pt is an AJO around javafx.geometry.Point3D.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • transformBounds (object Bounds)

    Transforms a Bounds AJO through this transform.

    • @p Bounds is an AJO around javafx.geometry.Bounds.
    • @r An AJO around the resulting javafx.geometry.Bounds.
  • deltaTransform (double X, double Y)

    Transforms only the vector portion (no translation) of a 2D point.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • deltaTransformPoint2D (object Pt)

    Transforms only the vector portion (no translation) of a Point2D AJO.

    • @p Pt is an AJO around javafx.geometry.Point2D.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • deltaTransform3D (double X, double Y, double Z)

    Transforms only the vector portion (no translation) of a 3D point.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @p Z is a double with the input Z coordinate.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • deltaTransformPoint3D (object Pt)

    Transforms only the vector portion (no translation) of a Point3D AJO.

    • @p Pt is an AJO around javafx.geometry.Point3D.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • inverseTransform (double X, double Y)

    Inverse-transforms a 2D point through this transform. Throws NonInvertibleTransformException when the matrix is not invertible.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • inverseTransformPoint2D (object Pt)

    Inverse-transforms a Point2D AJO through this transform. Throws NonInvertibleTransformException when the matrix is not invertible.

    • @p Pt is an AJO around javafx.geometry.Point2D.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • inverseTransform3D (double X, double Y, double Z)

    Inverse-transforms a 3D point through this transform. Throws NonInvertibleTransformException when the matrix is not invertible.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @p Z is a double with the input Z coordinate.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • inverseTransformPoint3D (object Pt)

    Inverse-transforms a Point3D AJO through this transform. Throws NonInvertibleTransformException when the matrix is not invertible.

    • @p Pt is an AJO around javafx.geometry.Point3D.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • inverseTransformBounds (object Bounds)

    Inverse-transforms a Bounds AJO through this transform. Throws NonInvertibleTransformException when the matrix is not invertible.

    • @p Bounds is an AJO around javafx.geometry.Bounds.
    • @r An AJO around the resulting javafx.geometry.Bounds.
  • inverseDeltaTransform (double X, double Y)

    Inverse-transforms only the vector portion (no translation) of a 2D point. Throws NonInvertibleTransformException when not invertible.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • inverseDeltaTransformPoint2D (object Pt)

    Inverse-transforms only the vector portion (no translation) of a Point2D AJO. Throws NonInvertibleTransformException when not invertible.

    • @p Pt is an AJO around javafx.geometry.Point2D.
    • @r An AJO around the resulting javafx.geometry.Point2D.
  • inverseDeltaTransform3D (double X, double Y, double Z)

    Inverse-transforms only the vector portion (no translation) of a 3D point. Throws NonInvertibleTransformException when not invertible.

    • @p X is a double with the input X coordinate.
    • @p Y is a double with the input Y coordinate.
    • @p Z is a double with the input Z coordinate.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • inverseDeltaTransformPoint3D (object Pt)

    Inverse-transforms only the vector portion (no translation) of a Point3D AJO. Throws NonInvertibleTransformException when not invertible.

    • @p Pt is an AJO around javafx.geometry.Point3D.
    • @r An AJO around the resulting javafx.geometry.Point3D.
  • transform2DPoints (object SrcPts, int SrcOff, object DstPts, int DstOff, int NumPts)

    Transforms an array of 2D points (interleaved x,y) through this transform, writing the results into the destination array.

    • @p SrcPts is an AJO around a Java double[] holding the source points.
    • @p SrcOff is an int with the starting offset into SrcPts.
    • @p DstPts is an AJO around a Java double[] receiving the transformed points.
    • @p DstOff is an int with the starting offset into DstPts.
    • @p NumPts is an int with the number of points to transform.
    • @r this object for chaining
  • transform3DPoints (object SrcPts, int SrcOff, object DstPts, int DstOff, int NumPts)

    Transforms an array of 3D points (interleaved x,y,z) through this transform, writing the results into the destination array.

    • @p SrcPts is an AJO around a Java double[] holding the source points.
    • @p SrcOff is an int with the starting offset into SrcPts.
    • @p DstPts is an AJO around a Java double[] receiving the transformed points.
    • @p DstOff is an int with the starting offset into DstPts.
    • @p NumPts is an int with the number of points to transform.
    • @r this object for chaining
  • inverseTransform2DPoints (object SrcPts, int SrcOff, object DstPts, int DstOff, int NumPts)

    Inverse-transforms an array of 2D points (interleaved x,y) through this transform. Throws NonInvertibleTransformException when not invertible.

    • @p SrcPts is an AJO around a Java double[] holding the source points.
    • @p SrcOff is an int with the starting offset into SrcPts.
    • @p DstPts is an AJO around a Java double[] receiving the transformed points.
    • @p DstOff is an int with the starting offset into DstPts.
    • @p NumPts is an int with the number of points to transform.
    • @r this object for chaining
  • inverseTransform3DPoints (object SrcPts, int SrcOff, object DstPts, int DstOff, int NumPts)

    Inverse-transforms an array of 3D points (interleaved x,y,z) through this transform. Throws NonInvertibleTransformException when not invertible.

    • @p SrcPts is an AJO around a Java double[] holding the source points.
    • @p SrcOff is an int with the starting offset into SrcPts.
    • @p DstPts is an AJO around a Java double[] receiving the transformed points.
    • @p DstOff is an int with the starting offset into DstPts.
    • @p NumPts is an int with the number of points to transform.
    • @r this object for chaining
  • buildEventDispatchChain (object Tail)

    Builds the event dispatch chain used by JavaFX to route events to this transform.

    • @p Tail is an AJO around javafx.event.EventDispatchChain.
    • @r An AJO around the resulting javafx.event.EventDispatchChain.
  • setOnTransformChanged (callback OnChanged)

    Registers a callback invoked when the transform changes.

    • @p OnChanged is a callback invoked with a TransformChangedEvent.
    • @r this object for chaining
  • getOnTransformChanged ()

    Returns the current onTransformChanged EventHandler.

    • @r An AJO around the EventHandler, or null when unset.
  • onTransformChangedProperty ()

    Returns the property backing the onTransformChanged EventHandler.

    • @r An ObjectProperty<EventHandler> AJO.