Commit e8e42988 authored by Adrian Johnson's avatar Adrian Johnson

cairo: ensure paintTransparencyGroup uses same ctm as beginTransparencyGroup

Bug 29968
parent f6c7aa75
......@@ -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)
......
......@@ -348,6 +348,7 @@ protected:
struct ColorSpaceStack {
GBool knockout;
GfxColorSpace *cs;
cairo_matrix_t group_matrix;
struct ColorSpaceStack *next;
} * groupColorSpaceStack;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment