[cairo-commit] cairo/src cairo_gstate.c,1.29,1.30
Carl Worth
commit at pdx.freedesktop.org
Tue Nov 4 10:46:47 PST 2003
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv10152/src
Modified Files:
cairo_gstate.c
Log Message:
Enable cairo_set_target_surface (cr, NULL) to work. This can be useful to
force the current target surface to be finalized.
Index: cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** cairo_gstate.c 4 Nov 2003 03:17:31 -0000 1.29
--- cairo_gstate.c 4 Nov 2003 18:46:45 -0000 1.30
***************
*** 326,329 ****
--- 326,336 ----
gstate->surface = surface;
+
+ /* Sometimes the user wants to return to having no target surface,
+ * (just like after cairo_create). This can be useful for forcing
+ * the old surface to be destroyed. */
+ if (surface == NULL)
+ return CAIRO_STATUS_SUCCESS;
+
cairo_surface_reference (gstate->surface);
More information about the cairo-commit
mailing list