[cairo-commit] src/cairo-ps-surface.c

Carl Worth cworth at kemper.freedesktop.org
Thu Apr 13 08:02:56 PDT 2006


 src/cairo-ps-surface.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree f17b347ab443fcc12f9098f9b601334f85d20a30 (from 6beababd47aabfb4896a878de09d729f287aa714)
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Apr 13 07:59:52 2006 -0700

    Fix page numbers in PostScript output to start at 1

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index d02eacf..b5062d4 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -848,11 +848,12 @@ _cairo_ps_surface_finish (void *abstract
 static void
 _cairo_ps_surface_start_page (cairo_ps_surface_t *surface)
 {
+    /* Increment before print so page numbers start at 1. */
+    surface->num_pages++;
     _cairo_output_stream_printf (surface->stream,
 				 "%%%%Page: %d %d\n",
 				 surface->num_pages,
 				 surface->num_pages);
-    surface->num_pages++;
 
     _cairo_output_stream_printf (surface->stream,
 				 "gsave %f %f translate %f %f scale \n",


More information about the cairo-commit mailing list