From 070d6122a997dfdc932c2ec2b3f547a6c8edef54 Mon Sep 17 00:00:00 2001 From: scuri Date: Wed, 13 Apr 2011 17:17:05 +0000 Subject: *** empty log message *** --- html/en/func/coordinates.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'html') 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]

Defines a transformation matrix with 6 elements. If the matrix is NULL, the transformation is reset to the identity. Default value: NULL.

-

The matrix contains scale, rotation and translation elements as follows:

+

The matrix contains scale (sx,sy), rotation (angle) and translation (dx,dy) elements as follows:

|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|
-

But notice that the indices are different of the +

In other words:

+
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
+

But notice that the indices are different of the cdCanvasVectorTextTransform.

Functions that retrieve images from the canvas are not affected by the transformation matrix, such as GetImage, GetImageRGB -- cgit v1.2.3