Class Matrix
The Matrix class represents a transformation matrix that determines how to map points from one coordinate space to another.
Constructor Attributes | Constructor Name and Description |
---|---|
Matrix()
Constructor.
|
Field Attributes | Field Name and Description |
---|---|
The value that affects the positioning of pixels along the x axis when scaling or rotating an image.
|
|
The value that affects the positioning of pixels along the y axis when rotating or skewing an image.
|
|
The value that affects the positioning of pixels along the x axis when rotating or skewing an image.
|
|
The value that affects the positioning of pixels along the y axis when scaling or rotating an image.
|
|
The distance by which to translate each point along the x axis.
|
|
The distance by which to translate each point along the y axis.
|
Method Attributes | Method Name and Description |
---|---|
clone()
Returns a new Matrix object that is a clone of this matrix, with an exact copy of the contained object.
|
|
concat(mtx)
Concatenates a matrix with the current matrix, effectively combining the geometric effects of the two.
|
|
concatTransform(x, y, scaleX, scaleY, rotation, regX, regY)
Concatenates a transformation with the current matrix, effectively combining the geometric effects of the two.
|
|
identity()
Sets each matrix property to a value that causes a null transformation.
|
|
invert()
Performs the opposite transformation of the original matrix.
|
|
rotate(angle)
Applies a rotation transformation to the Matrix object.
|
|
scale(sx, sy)
Applies a scaling transformation to the matrix.
|
|
toString()
Returns a text value listing the properties of the Matrix object.
|
|
translate(dx, dy)
Translates the matrix along the x and y axes, as specified by the dx and dy parameters.
|
Field Detail
a
The value that affects the positioning of pixels along the x axis when scaling or rotating an image.
b
The value that affects the positioning of pixels along the y axis when rotating or skewing an image.
c
The value that affects the positioning of pixels along the x axis when rotating or skewing an image.
d
The value that affects the positioning of pixels along the y axis when scaling or rotating an image.
tx
The distance by which to translate each point along the x axis.
ty
The distance by which to translate each point along the y axis.
Method Detail
clone()
Returns a new Matrix object that is a clone of this matrix, with an exact copy of the contained object.
concat(mtx)
Concatenates a matrix with the current matrix, effectively combining the geometric effects of the two.
- Parameters:
- mtx
concatTransform(x, y, scaleX, scaleY, rotation, regX, regY)
Concatenates a transformation with the current matrix, effectively combining the geometric effects of the two.
- Parameters:
- x
- y
- scaleX
- scaleY
- rotation
- regX
- regY
identity()
Sets each matrix property to a value that causes a null transformation.
invert()
Performs the opposite transformation of the original matrix.
rotate(angle)
Applies a rotation transformation to the Matrix object.
- Parameters:
- angle
scale(sx, sy)
Applies a scaling transformation to the matrix.
- Parameters:
- sx
- sy
toString()
Returns a text value listing the properties of the Matrix object.
translate(dx, dy)
Translates the matrix along the x and y axes, as specified by the dx and dy parameters.
- Parameters:
- dx
- dy