Matrix
Represents a 3x3 transformation matrix in the following form:
a c e
( b d f )
0 0 1
Definition
Package:@progress/kendo-drawing
Methods
Creates a new instance with the same element values.
- A new Matrix instance with the same element values.
Compares this matrix with another instance.
The matrix instance to compare with.
Returns:boolean
true if the matrix elements match. Otherwise, returns false.
Creates a transformation matrix for rotation with the specified parameters.
The angle of rotation in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right". Negative values or values greater than 360 are normalized.
xnumberThe center of rotation on the X axis.
ynumberThe center of rotation on the Y axis.
Returns:- The transformation matrix for the specified rotation.
Rounds the matrix elements to the specified number of fractional digits.
Creates a transformation matrix for the scale with the specified parameters.
The scale factor on the X axis.
scaleYnumberThe scale factor on the Y axis.
Returns:- The transformation matrix for the specified scale.
Returns the matrix elements as an [a, b, c, d, e, f] array.
The number of fractional digits.
Returns:number[]
- An array representation of the matrix.
Formats the matrix elements as a string.
The number of fractional digits.
separator?stringThe separator to place between elements.
Returns:string
- A string representation of the matrix. For example,
"1, 0, 0, 1, 0, 0".
Creates a transformation matrix for the translation with the specified parameters.
The distance to translate along the X axis.
ynumberThe distance to translate along the Y axis.
Returns:- The transformation matrix for the specified translation.