[cairo-commit] cairo-demo/cairo_snippets ChangeLog, 1.30, 1.31 cairo_snippets_png.c, 1.7, 1.8

Carl Worth commit at pdx.freedesktop.org
Fri Apr 1 18:04:01 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo-demo/cairo_snippets
In directory gabe:/tmp/cvs-serv22446

Modified Files:
	ChangeLog cairo_snippets_png.c 
Log Message:

        * cairo_snippets_png.c: (snippet_do_png): Track removal of
        cairo_set_target_png.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/ChangeLog,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ChangeLog	4 Mar 2005 18:39:36 -0000	1.30
+++ ChangeLog	2 Apr 2005 02:03:59 -0000	1.31
@@ -1,3 +1,8 @@
+2005-04-01  Carl Worth  <cworth at cworth.org>
+
+	* cairo_snippets_png.c: (snippet_do_png): Track removal of
+	cairo_set_target_png.
+
 2005-03-04  Owen Taylor  <otaylor at redhat.com>
 
 	* cairo_snippets_png.c (snippet_do_png): Open output file

Index: cairo_snippets_png.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/cairo_snippets_png.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cairo_snippets_png.c	4 Mar 2005 18:39:36 -0000	1.7
+++ cairo_snippets_png.c	2 Apr 2005 02:03:59 -0000	1.8
@@ -47,13 +47,14 @@
 
         cr = cairo_create ();
 
-        cairo_set_target_png (cr, file, CAIRO_FORMAT_ARGB32, IMAGE_WIDTH, IMAGE_HEIGHT);
+        cairo_set_target_image_no_data (cr, CAIRO_FORMAT_ARGB32,
+					IMAGE_WIDTH, IMAGE_HEIGHT);
 
         cairo_save (cr);
           snippet_do (cr, no, IMAGE_WIDTH, IMAGE_HEIGHT);
         cairo_restore (cr);
 
-        cairo_show_page (cr);
+	cairo_surface_write_png (cairo_get_target_surface (cr), file);
 
         fprintf (stdout, "\n");
 




More information about the cairo-commit mailing list