From 31391dbf64b25cfcfc72bc8948a17f97b7341357 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 2 Oct 2011 21:44:56 +1030 Subject: [PATCH 4/4] cairo: ensure mask matrix is set every time the mask is set --- poppler/CairoOutputDev.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 8ac8c3f..c2b6445 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -1625,6 +1625,7 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha, cairo_surface_destroy(source); } else { mask = cairo_pattern_reference(group); + cairo_get_matrix(cairo, &mask_matrix); } popTransparencyGroup(); @@ -1843,6 +1844,7 @@ void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, if (mask) cairo_pattern_destroy (mask); mask = cairo_pop_group (cairo); + cairo_get_matrix (cairo, &mask_matrix); } } @@ -1922,6 +1924,7 @@ void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream * if (state->getFillColorSpace()->getMode() == csPattern) { mask = cairo_pattern_reference (pattern); + cairo_get_matrix (cairo, &mask_matrix); } else if (!printing) { cairo_save (cairo); cairo_rectangle (cairo, 0., 0., 1., 1.); @@ -2194,6 +2197,7 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream } mask = cairo_pattern_reference (pattern); + cairo_get_matrix (cairo, &mask_matrix); } else { cairo_save (cairo); -- 1.7.4.1