[cairo] Rendering to PNG

Steve Chaplin stevech1097 at yahoo.com.au
Wed Dec 15 19:01:12 PST 2004

What would be the usual way to render to a png file?

Would it be the method used in cairo_snippets_png.c
cr = cairo_create ();
cairo_set_target_png (cr, file, CAIRO_FORMAT_ARGB32, IMAGE_WIDTH,
/* drawing operations */
cairo_show_page (cr);

or the method used in xsvg.c?
cr = cairo_create ();
cairo_set_target_image (cr, image, CAIRO_FORMAT_ARGB32, width, height,
width * 4);
/* drawing operations */
write_png_argb32 (image, png_file, width, height, width * 4);


More information about the cairo mailing list