[cairo] create an image from window for printing

Fabian Förg fabian.foerg at gmx.de
Fri Jan 19 10:51:03 PST 2007


is it possible to capture a gtk-window, save it as an image file and use 
that file for printing with cairo?
At first, I tried this:
pixmap = gdk_pixmap_new(window->window, window->allocation.width, 
window->allocation.height, -1);
This should save the window as a pixmap.
In order to print it, I tried gdk_cairo_set_source_pixbuf, but the 
function requires a pixbuf as an argument.
How can I convert the pixmap to a pixbuf and is my approach alright?


More information about the cairo mailing list