[poppler] Branch 'poppler-0.12' - poppler/CairoOutputDev.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Tue Jan 26 12:51:57 PST 2010


 poppler/CairoOutputDev.cc |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6203d1d98ad44f0fac55198504a959d494ac5a0c
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jan 26 20:49:17 2010 +0100

    [cairo] Use the right matrix for the mask in drawMaskedImage()
    
    Fixes bug #16906.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index a00db24..de8a6c2 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1707,6 +1707,7 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
   cairo_surface_t *maskImage, *image;
   cairo_pattern_t *maskPattern, *pattern;
   cairo_matrix_t matrix;
+  cairo_matrix_t maskMatrix;
   Guchar *pix;
   int x, y;
   int invert_bit;
@@ -1790,9 +1791,11 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
 
   cairo_matrix_init_translate (&matrix, 0, height);
   cairo_matrix_scale (&matrix, width, -height);
-
   cairo_pattern_set_matrix (pattern, &matrix);
-  cairo_pattern_set_matrix (maskPattern, &matrix);
+
+  cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
+  cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
+  cairo_pattern_set_matrix (maskPattern, &maskMatrix);
 
   cairo_save (cairo);
   cairo_set_source (cairo, pattern);


More information about the poppler mailing list