[cairo] How can i find out the absolute (x, y) of my next cairo operation

hap 497 hap497 at gmail.com
Sat Feb 20 10:37:04 PST 2010


Hi,

In cairo, I can move the 'origin' of my operation by using
cairo_translate, like this

http://www.cairographics.org/samples/
cairo_translate (cr, 0, 128);
cairo_rectangle (cr, 12, 12, 232, 70);

The actual rectangle is drawn at 12 and 140. Can you please tell me if
there is a way to find out the
absolute (x,y) of my cairo operation?  I may call cairo_translate()
multiple times in different places of my code, I just want to check
where will be (on the screen) my cairo_rectangle will be drawn (for
debugging purpose).

Thank you.


More information about the cairo mailing list