Re: Cairo transformations. Old bug that has been solved?

Behdad Esfahbod <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 10/09/11 11:21, Dov Grobgeld wrote:
>     return np.matrix([[c[0],c[1],c[4]], [c[2],c[3],c[5]], [0,0,1]])

This is wrong.  From cairo docs:

 * @xx: xx component of the affine transformation
 * @yx: yx component of the affine transformation
 * @xy: xy component of the affine transformation
 * @yy: yy component of the affine transformation
 * @x0: X translation component of the affine transformation
 * @y0: Y translation component of the affine transformation

 * <programlisting>
 *     x_new = xx * x + xy * y + x0;
 *     y_new = yx * x + yy * y + y0;
 * </programlisting>

So, it only makes sense that xx, xy, and x0 go on the first row, that is, c0,
c2, c4.  You are doing c0, c1, c4.

behdad
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.