poppler/CairoOutputDev.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit c40e2315cd796ba928969d13a761f5f19d8438fc Author: Adrian Johnson <[email protected]> Date: Fri Mar 23 21:49:42 2012 +1030 cairo: use a transparency group with setSoftMaskFromImageMask/unsetSoftMaskFromImageMask Drawing a tiling pattern between setSoftMaskFromImageMask and unsetSoftMaskFromImageMask clears the softmask. Similar to Splash, create a transparency group in setSoftMaskFromImageMask. Pop and paint the group in unsetSoftMaskFromImageMask. The saveState/restoreState is to ensure the softmask is restored before painting the group. Bug 47739 diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 40c6fce..c021e4c 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -1859,12 +1859,28 @@ void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stre drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg); } + if (state->getFillColorSpace()->getMode() == csPattern) { + cairo_set_source_rgb (cairo, 1, 1, 1); + cairo_set_matrix (cairo, &mask_matrix); + cairo_mask (cairo, mask); + } + if (mask) cairo_pattern_destroy (mask); mask = cairo_pop_group (cairo); + + saveState(state); + double bbox[4] = {0,0,1,1}; // dummy + beginTransparencyGroup(state, bbox, state->getFillColorSpace(), + gTrue, gFalse, gFalse); } void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state) { + double bbox[4] = {0,0,1,1}; // dummy + + endTransparencyGroup(state); + restoreState(state); + paintTransparencyGroup(state, bbox); clearSoftMask(state); } _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
