[poppler] glib/poppler-page.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon Jun 9 06:20:36 PDT 2008


 glib/poppler-page.cc |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 99e2d95728f41c91ab59a01c62d82b19a7a2e083
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Jun 1 00:49:32 2008 +0930

    glib: save/restore cairo state when rendering a page

diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index 5e0b2f1..9d41ecb 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -517,6 +517,7 @@ _poppler_page_render (PopplerPage *page,
 
   /* NOTE: instead of passing -1 we should/could use cairo_clip_extents()
    * to get a bounding box */
+  cairo_save (cairo);
   page->page->displaySlice(output_dev,
 			   72.0, 72.0, 0,
 			   gFalse, /* useMediaBox */
@@ -527,6 +528,7 @@ _poppler_page_render (PopplerPage *page,
 			   page->document->doc->getCatalog (),
 			   NULL, NULL,
 			   printing ? poppler_print_annot_cb : NULL, NULL);
+  cairo_restore (cairo);
 
   output_dev->setCairo (NULL);	
 }


More information about the poppler mailing list