[poppler] Branch 'poppler-0.18' - poppler/CairoOutputDev.cc poppler/CairoOutputDev.h
Adrian Johnson
ajohnson at kemper.freedesktop.org
Thu Jan 19 03:58:05 PST 2012
poppler/CairoOutputDev.cc | 8 ++++++--
poppler/CairoOutputDev.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 8006ed0beb4348e5ad94c547d7bf0d7a59da1b2f
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Mon Jan 16 21:25:19 2012 +1030
cairo: ensure paintTransparencyGroup uses same ctm as beginTransparencyGroup
Bug 29968
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index bf24867..fdfeb6e 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1396,6 +1396,7 @@ void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbo
ColorSpaceStack* css = new ColorSpaceStack;
css->cs = blendingColorSpace;
css->knockout = knockout;
+ cairo_get_matrix(cairo, &css->group_matrix);
css->next = groupColorSpaceStack;
groupColorSpaceStack = css;
@@ -1452,10 +1453,12 @@ void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) {
}
void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {
- cairo_set_source (cairo, group);
-
LOG(printf ("paint transparency group\n"));
+ cairo_save (cairo);
+ cairo_set_matrix (cairo, &groupColorSpaceStack->group_matrix);
+ cairo_set_source (cairo, group);
+
if (!mask) {
//XXX: deal with mask && shape case
if (shape) {
@@ -1495,6 +1498,7 @@ void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbo
}
popTransparencyGroup();
+ cairo_restore(cairo);
}
static int luminocity(uint32_t x)
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 949d459..b2e6fb2 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -348,6 +348,7 @@ protected:
struct ColorSpaceStack {
GBool knockout;
GfxColorSpace *cs;
+ cairo_matrix_t group_matrix;
struct ColorSpaceStack *next;
} * groupColorSpaceStack;
More information about the poppler
mailing list