From 94fb0a02433c64606d9fdf34384f2c119d9c7541 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Tue, 17 Nov 2009 19:12:30 +0100 Subject: [PATCH] [cairo] If there's a soft mask available when filling, apply the mask instead of filling Fixes bug #8474. --- poppler/CairoOutputDev.cc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 5f283c3..04457e4 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -668,7 +668,12 @@ void CairoOutputDev::fill(GfxState *state) { cairo_set_source (cairo, fill_pattern); LOG(printf ("fill\n")); //XXX: how do we get the path - cairo_fill (cairo); + if (mask) { + cairo_clip (cairo); + cairo_mask (cairo, mask); + } else { + cairo_fill (cairo); + } if (cairo_shape) { cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); doPath (cairo_shape, state, state->getPath()); -- 1.6.3.3