Re: Cairo transformations. Old bug that has been solved?
Dov Grobgeld <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CA++fsGEGNAYCdZCek7DxbkRF_kKo+J7HSq1pJOdQycUW+FVFJQ@mail.gmail.com> |
Thanks Behdad! I knew it was was something simple that I missed. Dov On Sun, Oct 9, 2011 at 20:23, Behdad Esfahbod <[email protected]> wrote: > 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