[cairo] How to clear surface content

Daniel Amelang daniel.amelang at gmail.com
Wed Feb 28 17:09:37 PST 2007


On 2/24/07, fred <fred at vaynom.net> wrote:
> Dear all,
>
> How could it be possible to erase the content of a
> Cairo::RefPtr<Cairo::ImageSurface> ?

Erase the content? You mean like just set the content to all black (or
all white)?

cr = cairo_create (image_surface);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* blank to white */
cairo_paint (cr);
cairo_destroy (cr);

You'll have to properly cairomm-ify that code first, of course.

Dan


More information about the cairo mailing list