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

Adrian Johnson ajohnson at kemper.freedesktop.org
Mon Aug 29 05:01:54 PDT 2011


 src/cairo-pdf-surface.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 2927d13ab260562dc269dc249fb5275da0b82d63
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Aug 29 21:31:09 2011 +0930

    pdf: use a new clipper object in recording_subsurface

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 2febca8..9f15aee 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -2456,12 +2456,16 @@ _cairo_pdf_surface_emit_recording_subsurface (cairo_pdf_surface_t  *surface,
 {
     double old_width, old_height;
     cairo_paginated_mode_t old_paginated_mode;
+    cairo_surface_clipper_t old_clipper;
     cairo_int_status_t status;
     int alpha = 0;
 
     old_width = surface->width;
     old_height = surface->height;
     old_paginated_mode = surface->paginated_mode;
+    old_clipper = surface->clipper;
+    _cairo_surface_clipper_init (&surface->clipper,
+				 _cairo_pdf_surface_clipper_intersect_clip_path);
 
     _cairo_pdf_surface_set_size_internal (surface,
 					  extents->width,
@@ -2498,6 +2502,8 @@ _cairo_pdf_surface_emit_recording_subsurface (cairo_pdf_surface_t  *surface,
 
     status = _cairo_pdf_surface_close_content_stream (surface);
 
+    _cairo_surface_clipper_reset (&surface->clipper);
+    surface->clipper = old_clipper;
     _cairo_pdf_surface_set_size_internal (surface,
 					  old_width,
 					  old_height);


More information about the cairo-commit mailing list