diff options
author | scuri <scuri> | 2011-04-13 17:17:05 +0000 |
---|---|---|
committer | scuri <scuri> | 2011-04-13 17:17:05 +0000 |
commit | 070d6122a997dfdc932c2ec2b3f547a6c8edef54 (patch) | |
tree | f100fe1add15d7c23d052cc651ac906fd8de4e19 /html | |
parent | bcf6192bffabb1c112ae3b7c84cd6c23f156ca19 (diff) |
*** empty log message ***
Diffstat (limited to 'html')
-rw-r--r-- | html/en/func/coordinates.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/html/en/func/coordinates.html b/html/en/func/coordinates.html index 55e9edc..1f09f4b 100644 --- a/html/en/func/coordinates.html +++ b/html/en/func/coordinates.html @@ -99,11 +99,18 @@ canvas:Transform(matrix: table) [in Lua]</pre> <p>Defines a transformation matrix with 6 elements. If the matrix is NULL, the transformation is reset to the identity. Default value: NULL.</p> - <p>The matrix contains scale, rotation and translation elements as follows:</p> + <p>The matrix contains scale (sx,sy), rotation (angle) and translation (dx,dy) elements as follows:</p> <pre>|x'| |sx*cos(angle) -sin(angle) dx| |x| |0 2 4| |y'| = | sin(angle) sy*cos(angle) dy| * |y| with indices |1 3 5| |1|</pre> - <p>But notice that the indices are different of the <strong> + <p>In other words:</p> + <pre>matrix[0] = sx*cos(angle) // Horizontal Scale and Rotation component +matrix[1] = sin(angle) // Rotation component (can also contain an horizontal shear component) +matrix[2] = -sin(angle) // Rotation component (can also contain a vertical shear component) +matrix[3] = sy*cos(angle) // Vertical Scale and Rotation component +matrix[4] = dx // Horizontal Translation component +matrix[5] = dy // Vertical Translation component</pre> + <p>But notice that the indices are different of the <strong> cdCanvasVectorTextTransform</strong>.</p> <p>Functions that retrieve images from the canvas are not affected by the transformation matrix, such as <strong>GetImage</strong>, <strong>GetImageRGB</strong> |