[poppler] poppler/CairoOutputDev.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Wed Sep 16 05:51:45 PDT 2015


 poppler/CairoOutputDev.cc |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 2a48cab5e66a69ed1bf3e792efc109ddcad8d5ee
Author: Jason Crain <jason at aquaticape.us>
Date:   Tue Sep 15 14:43:21 2015 -0500

    cairo: Use mask for even-odd fill
    
    Bug #84527

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 1e201d3..3916485 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -823,8 +823,16 @@ void CairoOutputDev::eoFill(GfxState *state) {
   cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
   cairo_set_source (cairo, fill_pattern);
   LOG(printf ("fill-eo\n"));
-  cairo_fill (cairo);
 
+  if (mask) {
+    cairo_save (cairo);
+    cairo_clip (cairo);
+    cairo_set_matrix (cairo, &mask_matrix);
+    cairo_mask (cairo, mask);
+    cairo_restore (cairo);
+  } else {
+    cairo_fill (cairo);
+  }
   if (cairo_shape) {
     cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
     doPath (cairo_shape, state, state->getPath());


More information about the poppler mailing list