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

Adrian Johnson ajohnson at kemper.freedesktop.org
Thu Feb 2 02:35:39 PST 2012


 src/cairo-ps-surface.c |   27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

New commits:
commit a004fe85291f8f941248ae5d02213c5c490a232a
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Feb 2 20:48:09 2012 +1030

    ps: add missing 'Q' to end of page

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 59dcdb9..f20bd4f 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1625,34 +1625,21 @@ _cairo_ps_surface_start_page (void *abstract_surface)
 }
 
 static cairo_int_status_t
-_cairo_ps_surface_end_page (cairo_ps_surface_t *surface)
-{
-    cairo_int_status_t status;
-
-    status = _cairo_pdf_operators_flush (&surface->pdf_operators);
-    if (unlikely (status))
-	return status;
-
-    if (surface->clipper.clip != NULL) {
-	_cairo_output_stream_printf (surface->stream, "Q Q\n");
-	_cairo_surface_clipper_reset (&surface->clipper);
-    } else
-	_cairo_output_stream_printf (surface->stream, "Q\n");
-
-    return CAIRO_STATUS_SUCCESS;
-}
-
-static cairo_int_status_t
 _cairo_ps_surface_show_page (void *abstract_surface)
 {
     cairo_ps_surface_t *surface = abstract_surface;
     cairo_int_status_t status;
 
-    status = _cairo_ps_surface_end_page (surface);
+    if (surface->clipper.clip != NULL)
+	_cairo_surface_clipper_reset (&surface->clipper);
+
+    status = _cairo_pdf_operators_flush (&surface->pdf_operators);
     if (unlikely (status))
 	return status;
 
-    _cairo_output_stream_printf (surface->stream, "showpage\n");
+    _cairo_output_stream_printf (surface->stream,
+				 "Q Q\n"
+				 "showpage\n");
 
     return CAIRO_STATUS_SUCCESS;
 }


More information about the cairo-commit mailing list