[PATCH] glib: save/restore cairo state when rendering a page
Adrian Johnson
ajohnson at redneon.com
Sat May 31 08:19:32 PDT 2008
---
glib/poppler-page.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
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);
}
--
1.5.2.4
--------------060305070303050306010305--
More information about the poppler
mailing list