[poppler] poppler/CairoOutputDev.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sun Apr 4 04:03:28 PDT 2010
poppler/CairoOutputDev.cc | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
New commits:
commit a32f6f9ebaed3e4827b9dc6cb37e307c2798f521
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Mar 28 18:43:14 2010 +0200
[cairo] Do not change device offset of mask surface
Also call cairo_paint() after set_source_rgb() to paint the background.
Fixes bug #27208.
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index b066c9b..c433fdb 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1263,19 +1263,12 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
colToDbl(backdropColorRGB.r),
colToDbl(backdropColorRGB.g),
colToDbl(backdropColorRGB.b));
-
+ cairo_paint(maskCtx);
cairo_matrix_t mat;
cairo_get_matrix(cairo, &mat);
cairo_set_matrix(maskCtx, &mat);
- /* make the device offset of the new mask match that of the group */
- double x_offset, y_offset;
- cairo_surface_t *pats;
- cairo_pattern_get_surface(group, &pats);
- cairo_surface_get_device_offset(pats, &x_offset, &y_offset);
- cairo_surface_set_device_offset(source, x_offset, y_offset);
-
/* paint the group */
cairo_set_source(maskCtx, group);
cairo_paint(maskCtx);
@@ -1308,9 +1301,7 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
/* setup the new mask pattern */
mask = cairo_pattern_create_for_surface(source);
- cairo_matrix_t patMatrix;
- cairo_pattern_get_matrix(group, &patMatrix);
- cairo_pattern_set_matrix(mask, &patMatrix);
+ cairo_pattern_set_matrix(mask, &mat);
cairo_surface_destroy(source);
} else {
More information about the poppler
mailing list