[cairo] Copy a drawable to a cairo surface

Tobias Ceglarek dev at ceglarek.eu
Tue Jul 31 00:16:07 PDT 2007


Hello,

my task is to copy all I can see in a gtk.gdk.Drawable to a cairo
surface.

For example: How can I draw in an image surface (cairo) all the things I
have drawn before in a gtk.TextView (inclusive all the text with color,
size, etc. typed in the gtk.TextView)?

I know that I can create a pangocairo.CairoContext with
gtk.gdk.Drawable.cairo_create(). With it I can draw with cairo on the
gtk.gdk.Drawable. But how can I change the surface and copy the contents
of the old surface to it?

My aim is to export the text created with a TextView to a PNG, PS, SVG
or what else.

I would be glad if anyone could help me.

Regards,

Tobias




More information about the cairo mailing list