From 5587fd584d8aaa4db495d8a6bd14668516527cd3 Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Tue, 15 Sep 2015 14:43:21 -0500 Subject: [PATCH] cairo: Use mask for even-odd fill Bug #84527 --- poppler/CairoOutputDev.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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()); -- 2.1.4