[cairo] Unsymmetrical rotation

Blagoj Kupev bkupev at gmail.com
Sun Mar 3 12:24:44 PST 2013


Hello,
Thanks for the feedback...
The proposed solution does not work. Now the rotation works even worst by
rotating the image with centre set to some other place.
/Blagoj

On Sun, Mar 3, 2013 at 8:40 PM, Krzysztof Kosiński <tweenk.pl at gmail.com>wrote:

> 2013/3/3 Blagoj Kupev <bkupev at gmail.com>:
> > In this case for any angle the rotated image starts from the top left
> corner
> > and is symmetrical. But if I try to set value different than 0 in
> x_offset
> > the position of the image is offset differently according to the angle.
> So
> > if i set x_offset = 50 and angle = 20; then the image is moved not only
> in x
> > direction but in y as well. For same offset but different angle the
> image is
> > placed at different x and y offsets.
>
> Switch the order of the cairo_translate() and cairo_rotate() calls, so
> that cairo_rotate() is called first.
>
> Regards, Krzysztof
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130303/b67d8483/attachment.html>


More information about the cairo mailing list