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
Inherited Variables
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
- public scale(x: Number, y: Number) : Scale
- 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
- public translate(x: Number, y: Number) : Translate