See the dojox/gfx/matrix reference documentation for more information.
a matrix, which reflects points at x = 0 line: flipX * (x, y) == (-x, y)
a matrix, which reflects points at the origin of coordinates: flipXY * (x, y) == (-x, -y)
a matrix, which reflects points at y = 0 line: flipY * (x, y) == (x, -y)
applies a matrix to a point
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix object to be applied |
x | Number | an x coordinate of a point |
y | Number | a y coordinate of a point |
applies a matrix at a central point
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix-like object, which is applied at a central point |
x | Number | an x component of the central point |
y | Number | a y component of the central point |
creates a copy of a 2D matrix
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix-like object to be cloned |
inverts a 2D matrix
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix-like object to be inverted |
returns whether the specified matrix is the identity.
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix object to be tested |
a 2D matrix object
Normalizes a 2D matrix-like object. If arrays is passed, all objects of the array are normalized and multiplied sequentially.
Parameter | Type | Description |
---|---|---|
arg | Object | a 2D matrix-like object, a number, or an array of such objects |
combines matrices by multiplying them sequentially in the given order
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix-like object, all subsequent arguments are matrix-like objects too |
applies a matrix to a point
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix object to be applied |
a | Number | dojox/gfx.Point | an x coordinate of a point, or a point |
b | Number |
Optional a y coordinate of a point |
Applies a matrix to a rectangle.
The method applies the transformation on all corners of the rectangle and returns the smallest rectangle enclosing the 4 transformed points.
Parameter | Type | Description |
---|---|---|
matrix | dojox/gfx/matrix.Matrix2D | a 2D matrix object to be applied. |
rect | Rectangle | the rectangle to transform. |
converts an object to a matrix, if necessary
Converts any 2D matrix-like object or an array of such objects to a valid dojox/gfx/matrix.Matrix2D object.
Parameter | Type | Description |
---|---|---|
matrix | Object | an object, which is converted to a matrix, if necessary |
forms an orthogonal projection matrix
The resulting matrix is used to project points orthogonally on a vector, which goes through the origin.
Parameter | Type | Description |
---|---|---|
a | dojox/gfx.Point | Number | a point-like object, which specifies a vector of projection, or an x coordinate value |
b | Number |
Optional a y coordinate value |
forms a reflection matrix
The resulting matrix is used to reflect points around a vector, which goes through the origin.
Parameter | Type | Description |
---|---|---|
a | dojox/gfx.Point | Number | a point-like object, which specifies a vector of reflection, or an X value |
b | Number |
Optional a Y value |
forms a rotating matrix
The resulting matrix is used to rotate points around the origin of coordinates (0, 0) by specified angle.
Parameter | Type | Description |
---|---|---|
angle | Number | an angle of rotation in radians (>0 for CW) |
rotates a picture using a specified point as a center of rotation
Compare with dojox/gfx/matrix.rotate().
Parameter | Type | Description |
---|---|---|
angle | Number | an angle of rotation in radians (>0 for CW) |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms a rotating matrix
The resulting matrix is used to rotate points around the origin of coordinates (0, 0) by specified degree. See dojox/gfx/matrix.rotate() for comparison.
Parameter | Type | Description |
---|---|---|
degree | Number | an angle of rotation in degrees (>0 for CW) |
rotates a picture using a specified point as a center of rotation
Compare with dojox/gfx/matrix.rotateg().
Parameter | Type | Description |
---|---|---|
degree | Number | an angle of rotation in degrees (>0 for CW) |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms a scaling matrix
The resulting matrix is used to scale (magnify) points by specified offsets.
Parameter | Type | Description |
---|---|---|
a | Number | dojox/gfx.Point | a scaling factor used for the x coordinate, or a uniform scaling factor used for the both coordinates, or a point-like object, which specifies scale factors for both dimensions |
b | Number |
Optional a scaling factor used for the y coordinate |
scales a picture using a specified point as a center of scaling
Compare with dojox/gfx/matrix.scale().
Parameter | Type | Description |
---|---|---|
a | Number | a scaling factor used for the x coordinate, or a uniform scaling factor used for both coordinates |
b | Number |
Optional a scaling factor used for the y coordinate |
c | Number | Point | an x component of a central point, or a central point |
d | Number | a y component of a central point |
forms an x skewing matrix
The resulting matrix is used to skew points in the x dimension around the origin of coordinates (0, 0) by specified angle.
Parameter | Type | Description |
---|---|---|
angle | Number | a skewing angle in radians |
skews a picture along the x axis using a specified point as a center of skewing
Compare with dojox/gfx/matrix.skewX().
Parameter | Type | Description |
---|---|---|
angle | Number | a skewing angle in radians |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms an x skewing matrix
The resulting matrix is used to skew points in the x dimension around the origin of coordinates (0, 0) by specified degree. See dojox/gfx/matrix.skewX() for comparison.
Parameter | Type | Description |
---|---|---|
degree | Number | a skewing angle in degrees |
skews a picture along the x axis using a specified point as a center of skewing
Compare with dojox/gfx/matrix.skewXg().
Parameter | Type | Description |
---|---|---|
degree | Number | a skewing angle in degrees |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms a y skewing matrix
The resulting matrix is used to skew points in the y dimension around the origin of coordinates (0, 0) by specified angle.
Parameter | Type | Description |
---|---|---|
angle | Number | a skewing angle in radians |
skews a picture along the y axis using a specified point as a center of skewing
Compare with dojox/gfx/matrix.skewY().
Parameter | Type | Description |
---|---|---|
angle | Number | a skewing angle in radians |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms a y skewing matrix
The resulting matrix is used to skew points in the y dimension around the origin of coordinates (0, 0) by specified degree. See dojox/gfx/matrix.skewY() for comparison.
Parameter | Type | Description |
---|---|---|
degree | Number | a skewing angle in degrees |
skews a picture along the y axis using a specified point as a center of skewing
Compare with dojox/gfx/matrix.skewYg().
Parameter | Type | Description |
---|---|---|
degree | Number | a skewing angle in degrees |
a | Number | dojox/gfx.Point | an x component of a central point, or a central point |
b | Number |
Optional a y component of a central point |
forms a translation matrix
The resulting matrix is used to translate (move) points by specified offsets.
Parameter | Type | Description |
---|---|---|
a | Number | dojox/gfx.Point | an x coordinate value, or a point-like object, which specifies offsets for both dimensions |
b | Number |
Optional a y coordinate value |