[cairo] Cairo, multi contexts ??
David Björkevik
david at bjorkevik.se
Tue Jun 2 04:11:06 PDT 2009
<doh! repost to list.>
L W wrote:
> Im having a problem with following task: Im drawing something on the gtk
> window, lets say a castle, inside drawing area widget. Then, i want to draw
> something else, on the top of the same surface, like tower, that then should
> be rotated by 90degs to achieve "fallen" tower.
Here's some pseudocode for your:
draw_castle(context);
cairo_save(context);
cairo_translate(context,100,100);
cairo_rotate(context,M_PI/2);
draw_tower(context);
cairo_restore(context);
Hopefully this can get you started.
Have fun with cairo!
/David
More information about the cairo
mailing list