New to Kendo UI for Angular? Start a free 30-day trial
Represents a 3x3 transformation matrix in the following form:
a c e
( b d f )
0 0 1
Name | Type | Default | Description |
---|
|
number
|
|
|
number
|
|
|
number
|
|
|
number
|
|
|
number
|
|
|
number
|
|
(a?: number, b?: number, c?: number, d?: number, e?: number, f?: number)
Creates a transformation matrix with the specified parameters.
number
The `a (1, 1)` member of the matrix.
number
The `b (2, 1)` member of the matrix.
number
The `c (1, 2)` member of the matrix.
number
The `d (2, 2)` member of the matrix.
number
The `e (1, 3)` member of the matrix.
number
The `f (2, 3)` member of the matrix.
|
---|
Creates a new instance with the same element values.
|
Returns | |
---|
Matrix
|
- A new Matrix instance with the same element values.
|
|
|
---|
Compares this matrix with another instance.
|
Parameters | | |
---|
other
|
Matrix
|
The matrix instance to compare with.
|
|
Returns | |
---|
boolean
|
true if the matrix elements match. Otherwise, returns false .
|
|
|
---|
Multiplies the matrix by another one and returns the result as a new instance. The current instance elements are not altered.
|
Parameters | | |
---|
matrix
|
Matrix
|
The matrix to multiply by.
|
|
Returns | |
---|
Matrix
|
- The result of the multiplication.
|
|
|
---|
Creates a transformation matrix for rotation with the specified parameters.
|
Parameters | | |
---|
angle
|
number
|
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.
|
x
|
number
|
The center of rotation on the X axis.
|
y
|
number
|
The center of rotation on the Y axis.
|
|
Returns | |
---|
Matrix
|
- The transformation matrix for the specified rotation.
|
|
|
---|
Rounds the matrix elements to the specified number of fractional digits.
|
Parameters | | |
---|
digits
|
number
|
The number of fractional digits.
|
|
Returns | |
---|
Matrix
|
- The current matrix instance.
|
|
|
---|
Creates a transformation matrix for the scale with the specified parameters.
|
Parameters | | |
---|
scaleX
|
number
|
The scale factor on the X axis.
|
scaleY
|
number
|
The scale factor on the Y axis.
|
|
Returns | |
---|
Matrix
|
- The transformation matrix for the specified scale.
|
|
|
---|
Returns the matrix elements as an [a, b, c, d, e, f] array.
|
Parameters | | |
---|
digits?
|
number
|
The number of fractional digits.
|
|
Returns | |
---|
number[]
|
- An array representation of the matrix.
|
|
|
---|
Formats the matrix elements as a string.
|
Parameters | | |
---|
digits?
|
number
|
The number of fractional digits.
|
separator?
|
string
|
The 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.
|
Parameters | | |
---|
x
|
number
|
The distance to translate along the X axis.
|
y
|
number
|
The distance to translate along the Y axis.
|
|
Returns | |
---|
Matrix
|
- The transformation matrix for the specified translation.
|
|
|
---|
Returns the unit (identity) transformation matrix.
|
Returns | |
---|
Matrix
|
- The unit (identity) matrix.
|
|