[cairo-commit] cairo-demo/cairo_snippets ChangeLog, 1.34, 1.35 cairo_snippets_pdf.c, 1.6, 1.7

Owen Taylor commit at pdx.freedesktop.org
Wed May 11 16:04:59 PDT 2005


Committed by: otaylor

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

Modified Files:
	ChangeLog cairo_snippets_pdf.c 
Log Message:
2005-05-11  Owen Taylor  <otaylor at redhat.com>

        * cairo_snippets_pdf.c (main): API update.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/ChangeLog,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- ChangeLog	11 May 2005 21:15:31 -0000	1.34
+++ ChangeLog	11 May 2005 23:04:57 -0000	1.35
@@ -1,5 +1,9 @@
 2005-05-11  Owen Taylor  <otaylor at redhat.com>
 
+	* cairo_snippets_pdf.c (main): API update.
+
+2005-05-11  Owen Taylor  <otaylor at redhat.com>
+
 	* cairo_snippets_png.c cairo_snippets_ps.c cairo_snippets_win32.c
 	snippets/*.cairo: Cairo API updates.
 

Index: cairo_snippets_pdf.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/cairo_snippets_pdf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cairo_snippets_pdf.c	21 Apr 2005 21:01:37 -0000	1.6
+++ cairo_snippets_pdf.c	11 May 2005 23:04:57 -0000	1.7
@@ -23,12 +23,15 @@
 {
         int i;
         FILE *file;
+	cairo_surface_t *surface;
         cairo_t *cr;
-
+	
         file = fopen ("snippets.pdf", "w");
-        cr = cairo_create ();
 
-        cairo_set_target_pdf (cr, file, X_INCHES, Y_INCHES, X_PPI, Y_PPI);
+	surface = cairo_pdf_surface_create (file,
+					    X_INCHES, Y_INCHES,
+					    X_PPI, Y_PPI);
+        cr = cairo_create (surface);
 
 	if (argc == 1) {
 		for (i = 0; i < snippet_count; i++)
@@ -40,6 +43,7 @@
 	}
 
         cairo_destroy (cr); 
+        cairo_surface_destroy (surface); 
 	fclose (file);
 
         return 0;




More information about the cairo-commit mailing list