JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Overview

This class provides functions to perform rotating, scaling, shearing, and translation transformations for `Affine` objects.

Example:

``````Rectangle {
width: 50
height: 50
fill:Color.RED
transforms: Transform.rotate(45,0,0); //rotate by 45 degress
}
``````

Profile: common

Script Function Summary

public affine(mxx: Number, myx: Number, mxy: Number, myy: Number, tx: Number, ty: Number) : Affine

Returns a new `Affine` object from 12 number values representing the 6 specifiable entries of the 3x4 Affine transformation matrix.

Returns a new `Affine` object from 12 number values representing the 6 specifiable entries of the 3x4 Affine transformation matrix.

Parameters
mxx
the X coordinate scaling element of the 3x4 matrix
myx
the Y coordinate shearing element of the 3x4 matrix
mxy
the X coordinate shearing element of the 3x4 matrix
myy
the Y coordinate scaling element of the 3x4 matrix
tx
the X coordinate translation element of the 3x4 matrix
ty
the Y coordinate translation element of the 3x4 matrix
Returns
Affine
a new `Affine` object derived from specified parameters

Profile: common

public affine(mxx: Number, mxy: Number, mxz: Number, tx: Number, myx: Number, myy: Number, myz: Number, ty: Number, mzx: Number, mzy: Number, mzz: Number, tz: Number) : Affine

Returns a new `Affine` object from 12 number values representing the 12 specifiable entries of the 3x4 Affine transformation matrix.

Returns a new `Affine` object from 12 number values representing the 12 specifiable entries of the 3x4 Affine transformation matrix.

Parameters
mxx
the X coordinate scaling element of the 3x4 matrix
mxy
the X coordinate shearing element of the 3x4 matrix
mxz
the XZ element of the 3x4 matrix
tx
the X coordinate translation element of the 3x4 matrix
myx
the Y coordinate shearing element of the 3x4 matrix
myy
the Y coordinate scaling element of the 3x4 matrix
myz
the YZ element of the 3x4 matrix
ty
the Y coordinate translation element of the 3x4 matrix
mzx
the ZX element of the 3x4 matrix
mzy
the ZY element of the 3x4 matrix
mzz
the Z coordinate scaling element of the 3x4 matrix
tz
the Z coordinate translation element of the 3x4 matrix
Returns
Affine
a new `Affine` object derived from specified parameters

Profile: common conditional scene3d

public rotate(angle: Number, pivotX: Number, pivotY: Number) : Rotate

Returns a `Rotate` object that rotates coordinates around a pivot point.

Returns a `Rotate` object that rotates coordinates around a pivot point.

This is equivalent to:

```    Rotate{ angle: angle pivotX: pivotX pivotY: pivotY }
```

Parameters
angle
pivotX
pivotY
Returns
Rotate

Profile: common

public scale(x: Number, y: Number) : Scale

Returns a `Scale` object representing a scaling transformation.

Returns a `Scale` object representing a scaling transformation.

This is equivalent to:

```    Scale { x: x y: y }
```

Parameters
x
y
Returns
Scale

Profile: common

public scale(x: Number, y: Number, pivotX: Number, pivotY: Number) : Scale

Returns a `Scale` object representing a scaling transformation.

Returns a `Scale` object representing a scaling transformation. The returned scale operation will be about the given pivot point.

This is equivalent to:

```    Scale { x: x y: y pivotX: pivotX pivotY: pivotY }
```

Parameters
x
y
pivotX
pivotY
Returns
Scale

Profile: common

public shear(x: Number, y: Number) : Shear

Returns a `Shear` object representing a shearing transformation.

Returns a `Shear` object representing a shearing transformation.

This is equivalent to:

```    Shear { x: x y: y }
```

Parameters
x
y
Returns
Shear

Profile: common

public translate(x: Number, y: Number) : Translate

Returns a `Translate` object representing a translation transformation.

Returns a `Translate` object representing a translation transformation.

This is equivalent to:

```    Translate { x: x y: y }
```

Parameters
x
y
Returns
Translate

Profile: common