[cairo-commit] cairo-demo/cairo_snippets ChangeLog, 1.39, 1.40 cairo_snippets_pdf.c, 1.8, 1.9

Kristian Hogsberg commit at pdx.freedesktop.org
Mon May 16 12:10:44 PDT 2005


Committed by: krh

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

Modified Files:
	ChangeLog cairo_snippets_pdf.c 
Log Message:
2005-05-16  Kristian Høgsberg  <krh at redhat.com>

        * cairo_snippets_pdf.c (main): Use new PDF constructor (filename
        instaed of FILE).



Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/ChangeLog,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- ChangeLog	13 May 2005 22:36:19 -0000	1.39
+++ ChangeLog	16 May 2005 19:10:42 -0000	1.40
@@ -1,3 +1,8 @@
+2005-05-16  Kristian Høgsberg  <krh at redhat.com>
+
+	* cairo_snippets_pdf.c (main): Use new PDF constructor (filename
+	instaed of FILE).
+
 2005-05-14  Øyvind Kolås  <pippin at freedesktop.org>
 
 	* cairo_snippets_png.c: reordered surface and cr destruction calls.

Index: cairo_snippets_pdf.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/cairo_snippets_pdf.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cairo_snippets_pdf.c	13 May 2005 16:33:59 -0000	1.8
+++ cairo_snippets_pdf.c	16 May 2005 19:10:42 -0000	1.9
@@ -20,13 +20,10 @@
 main (int argc, char *argv[])
 {
         int i;
-        FILE *file;
 	cairo_surface_t *surface;
         cairo_t *cr;
 	
-        file = fopen ("snippets.pdf", "w");
-
-	surface = cairo_pdf_surface_create (file, WIDTH, HEIGHT);
+	surface = cairo_pdf_surface_create ("snippets.pdf", WIDTH, HEIGHT);
         cr = cairo_create (surface);
 
 	if (argc == 1) {
@@ -40,7 +37,6 @@
 
         cairo_destroy (cr); 
         cairo_surface_destroy (surface); 
-	fclose (file);
 
         return 0;
 }




More information about the cairo-commit mailing list