summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html/en/func/coordinates.html11
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>