Top Description Inners Fields Constructors Methods
javafx.scene.transform

public Class Affine

extends Transform
Class Inheritance
Imports
com.sun.javafx.geom.transform.Affine3D, .BaseTransform, javafx.beans.property.DoubleProperty, .SimpleDoubleProperty, javafx.geometry.Point2D, .Point3D

The Affine class represents a general affine transform. An affine transform performs a linear mapping from 2D/3D coordinates to other 2D/3D coordinates while preserving the "straightness" and "parallelness" of lines. Affine transformations can be constructed using sequence rotations, translations, scales, and shears.

For simple transformations application developers should use the specific Translate, Scale, Rotate, or Shear transforms, which are more lightweight and thus more optimal for this simple purpose. The Affine class, on the other hand, has the advantage of being able to represent a general affine transform and perform matrix operations on it in place, so it fits better for more complex transformation usages.

Such a coordinate transformation can be represented by a 3 row by 4 column matrix. This matrix transforms source coordinates (x,y,z) into destination coordinates (x',y',z') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:

     [ x']   [  mxx  mxy  mxz  tx  ] [ x ]   [ mxx * x + mxy * y + mxz * z + tx ]
     [ y'] = [  myx  myy  myz  ty  ] [ y ] = [ myx * x + myy * y + myz * z + ty ]
     [ z']   [  mzx  mzy  mzz  tz  ] [ z ]   [ mzx * x + mzy * y + mzz * z + tz ]
                                     [ 1 ]
Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
Affine.AffineAtomicChange

Keeps track of the atomic changes of more elements.

private class
Affine.AffineElementProperty

Affine element property which handles the atomic changes of more properties.

Field Summary

Modifier and TypeField and Description
private static final int
APPLY_3D_COMPLEX

This constant is used for the internal state3d variable to indicate that the matrix is not in any of the recognized simple states and therefore needs a full usage of all elements to complete the transformation equation of this transform.

private static final int
APPLY_IDENTITY

This constant is used for the internal state2d variable to indicate that no calculations need to be performed and that the source coordinates only need to be copied to their destinations to complete the transformation equation of this transform.

private static final int
APPLY_NON_3D

This constant is used for the internal state3d variable to indicate that the matrix represents a 2D-only transform.

private static final int
APPLY_SCALE

This constant is used for the internal state2d and state3d variables to indicate that the scaling components of the matrix need to be factored in to complete the transformation equation of this transform.

private static final int
APPLY_SHEAR

This constant is used for the internal state2d variable to indicate that the shearing components of the matrix (mxy and myx) need to be factored in to complete the transformation equation of this transform.

private static final int
APPLY_TRANSLATE

This constant is used for the internal state2d and state3d variables that the translation components of the matrix need to be added to complete the transformation equation of this transform.

pack-priv Affine.AffineAtomicChange
atomicChange

Tracks atomic changes of more elements.

private Affine.AffineElementProperty
mxx

Defines the X coordinate scaling element of the 3x4 matrix.

private Affine.AffineElementProperty
mxy

Defines the XY coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
mxz

Defines the XZ coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
myx

Defines the YX coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
myy

Defines the Y coordinate scaling element of the 3x4 matrix.

private Affine.AffineElementProperty
myz

Defines the YZ coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
mzx

Defines the ZX coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
mzy

Defines the ZY coordinate element of the 3x4 matrix.

private Affine.AffineElementProperty
mzz

Defines the Z coordinate scaling element of the 3x4 matrix.

private static final int[]
rot90conversion

Table of 2D state changes during predictable quadrant rotations where the shear and scaleAffine values are swapped and negated.

private transient int
state2d

If this is a 2D transform, this field keeps track of which components of the matrix need to be applied when performing a transformation.

private transient int
state3d

This field keeps track of whether or not this transform is 3D and if so it tracks several simple states that can be treated faster.

private Affine.AffineElementProperty
tx

Defines the X coordinate translation element of the 3x4 matrix.

private Affine.AffineElementProperty
ty

Defines the Y coordinate translation element of the 3x4 matrix.

private Affine.AffineElementProperty
tz

Defines the Z coordinate translation element of the 3x4 matrix.

private double
private double
private double
private double
private double
private double
private double
private double
private double
private double
private double
private double

Constructor Summary

AccessConstructor and Description
public
Affine()

Creates a new instance of Affine containing an identity transform.

public
Affine(Transform
transform whose matrix is to be filled to the new instance
transform
)

Creates a new instance of Affine filled with the values from the specified transform.

public
Affine(double
the X coordinate scaling element
mxx
,
double
the XY coordinate element
mxy
,
double
the X coordinate translation element
tx
,
double
the YX coordinate element
myx
,
double
the Y coordinate scaling element
myy
,
double
the Y coordinate translation element
ty
)

Creates a new instance of Affine with a 2D transform specified by the element values.

public
Affine(double
the X coordinate scaling element
mxx
,
double
the XY coordinate element
mxy
,
double
the XZ coordinate element
mxz
,
double
the X coordinate translation element
tx
,
double
the YX coordinate element
myx
,
double
the Y coordinate scaling element
myy
,
double
the YZ coordinate element
myz
,
double
the Y coordinate translation element
ty
,
double
the ZX coordinate element
mzx
,
double
the ZY coordinate element
mzy
,
double
the Z coordinate scaling element
mzz
,
double
the Z coordinate translation element
tz
)

Creates a new instance of Affine with a transform specified by the element values.

public
Affine(double[]
array containing the flattened transformation matrix
matrix
,
MatrixType
type of matrix contained in the array
type
,
int
offset of the first element in the array
offset
)

Creates a new instance of Affine with a transformation matrix specified by an array.

Method Summary

Modifier and TypeMethod and Description
public void
append(Transform
transform to be appended to this instance
transform
)

Appends the specified transform to this instance.

public void
append(double
the X coordinate scaling element of the transform to be appended
mxx
,
double
the XY coordinate element of the transform to be appended
mxy
,
double
the X coordinate translation element of the transform to be appended
tx
,
double
the YX coordinate element of the transform to be appended
myx
,
double
the Y coordinate scaling element of the transform to be appended
myy
,
double
the Y coordinate translation element of the transform to be appended
ty
)

Appends the 2D transform specified by the element values to this instance.

public void
append(double
the X coordinate scaling element of the transform to be appended
mxx
,
double
the XY coordinate element of the transform to be appended
mxy
,
double
the XZ coordinate element of the transform to be appended
mxz
,
double
the X coordinate translation element of the transform to be appended
tx
,
double
the YX coordinate element of the transform to be appended
myx
,
double
the Y coordinate scaling element of the transform to be appended
myy
,
double
the YZ coordinate element of the transform to be appended
myz
,
double
the Y coordinate translation element of the transform to be appended
ty
,
double
the ZX coordinate element of the transform to be appended
mzx
,
double
the ZY coordinate element of the transform to be appended
mzy
,
double
the Z coordinate scaling element of the transform to be appended
mzz
,
double
the Z coordinate translation element of the transform to be appended
tz
)

Appends the transform specified by the element values to this instance.

public void
append(double[]
array containing the flattened transformation matrix to be appended
matrix
,
MatrixType
type of matrix contained in the array
type
,
int
offset of the first matrix element in the array
offset
)

Appends the transform specified by the array to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
)

Appends the 2D rotation to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
)

Appends the 2D rotation with pivot to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
,
Point2D
the rotation pivot point
pivot
)

Appends the 2D rotation with pivot to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
,
double
the Z coordinate of the rotation pivot point
pivotZ
,
double
the X coordinate magnitude of the rotation axis
axisX
,
double
the Y coordinate magnitude of the rotation axis
axisY
,
double
the Z coordinate magnitude of the rotation axis
axisZ
)

Appends the rotation to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
,
double
the Z coordinate of the rotation pivot point
pivotZ
,
Point3D
the rotation axis
axis
)

Appends the rotation to this instance.

public void
appendRotation(double
the angle of the rotation in degrees
angle
,
Point3D
the rotation pivot point
pivot
,
Point3D
the rotation axis
axis
)

Appends the rotation to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
)

Appends the 2D scale to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the X coordinate of the point about which the scale occurs
pivotX
,
double
the Y coordinate of the point about which the scale occurs
pivotY
)

Appends the 2D scale with pivot to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
Point2D
the point about which the scale occurs
pivot
)

Appends the 2D scale with pivot to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
)

Appends the scale to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
,
double
the X coordinate of the point about which the scale occurs
pivotX
,
double
the Y coordinate of the point about which the scale occurs
pivotY
,
double
the Z coordinate of the point about which the scale occurs
pivotZ
)

Appends the scale with pivot to this instance.

public void
appendScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
,
Point3D
the point about which the scale occurs
pivot
)

Appends the scale with pivot to this instance.

public void
appendShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
)

Appends the shear to this instance.

public void
appendShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
,
double
the X coordinate of the shear pivot point
pivotX
,
double
the Y coordinate of the shear pivot point
pivotY
)

Appends the shear with pivot to this instance.

public void
appendShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
,
Point2D
the shear pivot point
pivot
)

Appends the shear with pivot to this instance.

pack-priv void
appendTo(Affine a)

Overrides javafx.scene.transform.Transform.appendTo.

Visitor from Affine class which provides an efficient append operation for the subclasses.

public void
appendTranslation(double
the X coordinate translation
tx
,
double
the Y coordinate translation
ty
)

Appends the 2D translation to this instance.

public void
appendTranslation(double
the X coordinate translation
tx
,
double
the Y coordinate translation
ty
,
double
the Z coordinate translation
tz
)

Appends the translation to this instance.

pack-priv void
apply(final Affine3D trans)

Implements abstract javafx.scene.transform.Transform.apply.

pack-priv boolean
atomicChangeRuns()

Used only by tests to check the atomic operation state

public Affine
clone()

Overrides javafx.scene.transform.Transform.clone.

Returns a deep copy of this transform.

pack-priv boolean
computeIs2D()

Overrides javafx.scene.transform.Transform.computeIs2D.

Computes if this transform is currently a 2D transform (has no effect in the direction of Z axis).

pack-priv boolean
computeIsIdentity()

Overrides javafx.scene.transform.Transform.computeIsIdentity.

Computes if this transform is currently an identity (has no effect in any direction).

public Transform
createConcatenation(Transform transform)

Overrides javafx.scene.transform.Transform.createConcatenation.

Returns the concatenation of this transform and the specified transform.

public Affine
createInverse()

Overrides javafx.scene.transform.Transform.createInverse.

Returns the inverse transform of this transform.

public Point2D
deltaTransform(double x, double y)

Overrides javafx.scene.transform.Transform.deltaTransform.

Transforms the relative magnitude vector by this transform.

public Point3D
deltaTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.deltaTransform.

Transforms the relative magnitude vector by this transform.

pack-priv BaseTransform
public double
determinant()

Overrides javafx.scene.transform.Transform.determinant.

Computes determinant of the transformation matrix.

private double

Returns:

determinant
getDeterminant2D
()

2D implementation of determinant().

private double

Returns:

determinant
getDeterminant3D
()

3D implementation of determinant().

public final double
getMxx()

Overrides javafx.scene.transform.Transform.getMxx.

Gets the X coordinate scaling element of the 3x4 matrix.

public final double
getMxy()

Overrides javafx.scene.transform.Transform.getMxy.

Gets the XY coordinate element of the 3x4 matrix.

public final double
getMxz()

Overrides javafx.scene.transform.Transform.getMxz.

Gets the XZ coordinate element of the 3x4 matrix.

public final double
getMyx()

Overrides javafx.scene.transform.Transform.getMyx.

Gets the YX coordinate element of the 3x4 matrix.

public final double
getMyy()

Overrides javafx.scene.transform.Transform.getMyy.

Gets the Y coordinate scaling element of the 3x4 matrix.

public final double
getMyz()

Overrides javafx.scene.transform.Transform.getMyz.

Gets the YZ coordinate element of the 3x4 matrix.

public final double
getMzx()

Overrides javafx.scene.transform.Transform.getMzx.

Gets the ZX coordinate element of the 3x4 matrix.

public final double
getMzy()

Overrides javafx.scene.transform.Transform.getMzy.

Gets the ZY coordinate element of the 3x4 matrix.

public final double
getMzz()

Overrides javafx.scene.transform.Transform.getMzz.

Gets the Z coordinate scaling element of the 3x4 matrix.

pack-priv int
getState2d()

Used only by tests to check the 2d matrix state

pack-priv int
getState3d()

Used only by tests to check the 3d matrix state

public final double
getTx()

Overrides javafx.scene.transform.Transform.getTx.

Gets the X coordinate translation element of the 3x4 matrix.

public final double
getTy()

Overrides javafx.scene.transform.Transform.getTy.

Gets the Y coordinate translation element of the 3x4 matrix.

public final double
getTz()

Overrides javafx.scene.transform.Transform.getTz.

Gets the Z coordinate translation element of the 3x4 matrix.

public Point2D
inverseDeltaTransform(double x, double y)

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Transforms the relative magnitude vector by the inverse of this transform.

public Point3D
inverseDeltaTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Transforms the relative magnitude vector by the inverse of this transform.

public Point2D
inverseTransform(double x, double y)

Overrides javafx.scene.transform.Transform.inverseTransform.

Transforms the specified point by the inverse of this transform.

public Point3D
inverseTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.inverseTransform.

Transforms the specified point by the inverse of this transform.

pack-priv void
inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.inverseTransform2DPointsImpl.

Core of the inverseTransform2DPoints method.

pack-priv void
inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.inverseTransform3DPointsImpl.

Core of the inverseTransform3DPoints method.

public void
invert()

Inverts this transform in place.

private void
invert2D()

2D implementation of invert().

private void
invert3D()

3D implementation of invert().

public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
private void
postProcessChange()

Called by each element property after value change to update the state variables and call transform change notifications.

public void
prepend(Transform
transform to be prepended to this instance
transform
)

Prepends the specified transform to this instance.

public void
prepend(double
the X coordinate scaling element of the transform to be prepended
mxx
,
double
the XY coordinate element of the transform to be prepended
mxy
,
double
the X coordinate translation element of the transform to be prepended
tx
,
double
the YX coordinate element of the transform to be prepended
myx
,
double
the Y coordinate scaling element of the transform to be prepended
myy
,
double
the Y coordinate translation element of the transform to be prepended
ty
)

Prepends the 2D transform specified by the element values to this instance.

public void
prepend(double
the X coordinate scaling element of the transform to be prepended
mxx
,
double
the XY coordinate element of the transform to be prepended
mxy
,
double
the XZ coordinate element of the transform to be prepended
mxz
,
double
the X coordinate translation element of the transform to be prepended
tx
,
double
the YX coordinate element of the transform to be prepended
myx
,
double
the Y coordinate scaling element of the transform to be prepended
myy
,
double
the YZ coordinate element of the transform to be prepended
myz
,
double
the Y coordinate translation element of the transform to be prepended
ty
,
double
the ZX coordinate element of the transform to be prepended
mzx
,
double
the ZY coordinate element of the transform to be prepended
mzy
,
double
the Z coordinate scaling element of the transform to be prepended
mzz
,
double
the Z coordinate translation element of the transform to be prepended
tz
)

Prepends the transform specified by the element values to this instance.

public void
prepend(double[]
array containing the flattened transformation matrix to be prepended
matrix
,
MatrixType
type of matrix contained in the array
type
,
int
offset of the first matrix element in the array
offset
)

Prepends the transform specified by the array to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
)

Prepends the 2D rotation to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
)

Prepends the 2D rotation with pivot to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
,
Point2D
the rotation pivot point
pivot
)

Prepends the 2D rotation with pivot to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
,
double
the Z coordinate of the rotation pivot point
pivotZ
,
double
the X coordinate magnitude of the rotation axis
axisX
,
double
the Y coordinate magnitude of the rotation axis
axisY
,
double
the Z coordinate magnitude of the rotation axis
axisZ
)

Prepends the rotation to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
,
double
the X coordinate of the rotation pivot point
pivotX
,
double
the Y coordinate of the rotation pivot point
pivotY
,
double
the Z coordinate of the rotation pivot point
pivotZ
,
Point3D
the rotation axis
axis
)

Prepends the rotation to this instance.

public void
prependRotation(double
the angle of the rotation in degrees
angle
,
Point3D
the rotation pivot point
pivot
,
Point3D
the rotation axis
axis
)

Prepends the rotation to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
)

Prepends the 2D scale to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the X coordinate of the point about which the scale occurs
pivotX
,
double
the Y coordinate of the point about which the scale occurs
pivotY
)

Prepends the 2D scale with pivot to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
Point2D
the point about which the scale occurs
pivot
)

Prepends the 2D scale with pivot to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
)

Prepends the scale to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
,
double
the X coordinate of the point about which the scale occurs
pivotX
,
double
the Y coordinate of the point about which the scale occurs
pivotY
,
double
the Z coordinate of the point about which the scale occurs
pivotZ
)

Prepends the scale with pivot to this instance.

public void
prependScale(double
the X coordinate scale factor
sx
,
double
the Y coordinate scale factor
sy
,
double
the Z coordinate scale factor
sz
,
Point3D
the point about which the scale occurs
pivot
)

Prepends the scale with pivot to this instance.

public void
prependShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
)

Prepends the shear to this instance.

public void
prependShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
,
double
the X coordinate of the shear pivot point
pivotX
,
double
the Y coordinate of the shear pivot point
pivotY
)

Prepends the shear with pivot to this instance.

public void
prependShear(double
the XY coordinate element
shx
,
double
the YX coordinate element
shy
,
Point2D
the shear pivot point
pivot
)

Prepends the shear with pivot to this instance.

pack-priv void
prependTo(Affine a)

Overrides javafx.scene.transform.Transform.prependTo.

Visitor from Affine class which provides an efficient prepend operation for the subclasses.

public void
prependTranslation(double
the X coordinate translation
tx
,
double
the Y coordinate translation
ty
,
double
the Z coordinate translation
tz
)

Prepends the translation to this instance.

public void
prependTranslation(double
the X coordinate translation
tx
,
double
the Y coordinate translation
ty
)

Prepends the 2D translation to this instance.

private void
preRotate2D(double theta)

2D implementation of prependRotation.

private void
preRotate2D_180()

2D implementation of prependRotation for 180 degrees rotation around Z axis.

private void
preRotate2D_270()

2D implementation of prependRotation for 270 degrees rotation around Z axis.

private void
preRotate2D_90()

2D implementation of prependRotation for 90 degrees rotation around Z axis.

private void
preRotate3D(double angle, double axisX, double axisY, double axisZ)

Implementation of the prependRotation() around an arbitrary axis.

private void
preRotate3D(double theta)

3D implementation of prependRotation around Z axis.

private void
preRotate3D_180()

3D implementation of prependRotation for 180 degrees rotation around Z axis.

private void
preRotate3D_270()

3D implementation of prependRotation for 270 degrees rotation around Z axis.

private void
preRotate3D_90()

3D implementation of prependRotation for 90 degrees rotation around Z axis.

private void
preScale2D(double sx, double sy)

2D implementation of prependScale().

private void
preScale3D(double sx, double sy, double sz)

3D implementation of prependScale().

private void
preShear2D(double shx, double shy)

2D implementation of prependShear().

private void
preShear3D(double shx, double shy)

3D implementation of prependShear().

private void
preTranslate2D(double tx, double ty)

2D implementation of prependTranslation().

private void
preTranslate3D(double tx, double ty, double tz)

3D implementation of prependTranslation().

private void
rotate2D(double theta)

2D implementation of appendRotation.

private void
rotate2D_180()

2D implementation of appendRotation for 180 degrees rotation around Z axis.

private void
rotate2D_270()

2D implementation of appendRotation for 270 degrees rotation around Z axis.

private void
rotate2D_90()

2D implementation of appendRotation for 90 degrees rotation around Z axis.

private void
rotate3D(double angle, double axisX, double axisY, double axisZ)

Implementation of the appendRotation() around an arbitrary axis.

private void
rotate3D(double theta)

3D implementation of appendRotation around Z axis.

private void
rotate3D_180()

3D implementation of appendRotation for 180 degrees rotation around Z axis.

private void
rotate3D_270()

3D implementation of appendRotation for 270 degrees rotation around Z axis.

private void
rotate3D_90()

3D implementation of appendRotation for 90 degrees rotation around Z axis.

private void
scale2D(double sx, double sy)

2D implementation of appendScale().

private void
scale3D(double sx, double sy, double sz)

3D implementation of appendScale().

public void
setElement(MatrixType
type of matrix to work with
type
,
int
zero-based row number
row
,
int
zero-based column number
column
,
double
new value of the specified transformation matrix element
value
)

Sets the specified element of the transformation matrix.

public final void
setMxx(double value)

public final void
setMxy(double value)

public final void
setMxz(double value)

public final void
setMyx(double value)

public final void
setMyy(double value)

public final void
setMyz(double value)

public final void
setMzx(double value)

public final void
setMzy(double value)

public final void
setMzz(double value)

public void
setToIdentity()

Resets this transform to the identity transform.

public void
setToTransform(Transform
transform whose matrix is to be filled to this instance
transform
)

Sets the values of this instance to the values provided by the specified transform.

public void
setToTransform(double
the X coordinate scaling element
mxx
,
double
the XY coordinate element
mxy
,
double
the X coordinate translation element
tx
,
double
the YX coordinate element
myx
,
double
the Y coordinate scaling element
myy
,
double
the Y coordinate translation element
ty
)

Sets the values of this instance to the 2D transform specified by the element values.

public void
setToTransform(double
the X coordinate scaling element
mxx
,
double
the XY coordinate element
mxy
,
double
the XZ coordinate element
mxz
,
double
the X coordinate translation element
tx
,
double
the YX coordinate element
myx
,
double
the Y coordinate scaling element
myy
,
double
the YZ coordinate element
myz
,
double
the Y coordinate translation element
ty
,
double
the ZX coordinate element
mzx
,
double
the ZY coordinate element
mzy
,
double
the Z coordinate scaling element
mzz
,
double
the Z coordinate translation element
tz
)

Sets the values of this instance to the transform specified by the element values.

public void
setToTransform(double[]
array containing the flattened transformation matrix
matrix
,
MatrixType
type of matrix contained in the array
type
,
int
offset of the first element in the array
offset
)

Sets the values of this instance to the transformation matrix specified by an array.

public final void
setTx(double value)

public final void
setTy(double value)

public final void
setTz(double value)

private void
shear2D(double shx, double shy)

2D implementation of appendShear().

private void
shear3D(double shx, double shy)

3D implementation of appendShear().

private static void
stateError()

Convenience method used internally to throw exceptions when a case was forgotten in a switch statement.

public String

Returns:

a string representation of this Affine object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this Affine object.

public Point2D
transform(double x, double y)

Overrides javafx.scene.transform.Transform.transform.

Transforms the specified point by this transform.

public Point3D
transform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.transform.

Transforms the specified point by this transform.

pack-priv void
transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform2DPointsImpl.

Core of the transform2DPoints method.

pack-priv void
transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform3DPointsImpl.

Core of the transform3DPoints method.

private void
translate2D(double tx, double ty)

2D implementation of appendTranslation().

private void
translate3D(double tx, double ty, double tz)

3D implementation of appendTranslation().

public final DoubleProperty
public final DoubleProperty
public final DoubleProperty
private void
updateState()

Manually recalculates the state of the transform when the matrix changes too much to predict the effects on the state.

private void
updateState2D()

2D part of updateState().

Inherited from javafx.scene.transform.Transform:
addaddEventFilteraddEventHandleraffineaffinebuildEventDispatchChaincheckRequestedMATclearInverseCachecolumncolumncreateImmutableTransformcreateImmutableTransformcreateImmutableTransformcreateImmutableTransformdeltaTransformdeltaTransformensureCanTransform2DPointfill2DArrayfill3DArraygetElementgetOnTransformChangedidentityPropertyinverseDeltaTransforminverseDeltaTransforminverseTransforminverseTransforminverseTransforminverseTransform2DPointsinverseTransform3DPointsisIdentityisType2DonTransformChangedPropertyremoveremoveEventFilterremoveEventHandlerrotaterowrowscalescalesetOnTransformChangedshearshearsimilarTotoArraytoArraytransformtransformtransformtransform2DPointstransform3DPointstransformChangedtranslatetype2DPropertyvalidate