[cairo] Unsymmetrical rotation

Krzysztof Kosiński tweenk.pl at gmail.com
Sun Mar 3 11:40:30 PST 2013


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


More information about the cairo mailing list