[cairo] Adding cairo_shear and family

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Sat Jan 10 14:42:53 PST 2009


Hi,

I think calling a 2x2 multiplication by

[ 1  sx]
[ sy  1]

a shear is slightly misleading since shears don't commute. 
While it's true that shears along the coordinate axes are given 
respectively by

[1 sx], [1  0],
[0  1]  [sy 1]

it matters whether one does an x-shear first or a y-shear first, 
and [1 sx; sy 1] isn't a simple combination of x- and y-shears 
alone.  Also, the inverse of the [1 sx; sy 1] matrix is

      1       [1  -sx]
-----------  [-sy  1].
(1 - sx sy)

Finally, I think the docs shouldn't give the equations in matrix 
form but rather in words and scalar equations like the others do. 
None of the other cairo_t or cairo_matrix_t functions use matrix 
form.

Cheers,

Joonas


More information about the cairo mailing list