From e63f262de3294eb6a766ca93435f95368b46eaca Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 2 Oct 2011 21:39:52 +1030 Subject: [PATCH 3/4] cairo: save mask matrix on mask stack --- poppler/CairoOutputDev.cc | 2 ++ poppler/CairoOutputDev.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index d3f4026..8ac8c3f 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -266,6 +266,7 @@ void CairoOutputDev::saveState(GfxState *state) { MaskStack *ms = new MaskStack; ms->mask = cairo_pattern_reference(mask); + ms->mask_matrix = mask_matrix; ms->next = maskStack; maskStack = ms; } @@ -289,6 +290,7 @@ void CairoOutputDev::restoreState(GfxState *state) { if (mask) cairo_pattern_destroy(mask); mask = ms->mask; + mask_matrix = ms->mask_matrix; maskStack = ms->next; delete ms; } diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h index 49daf75..949d459 100644 --- a/poppler/CairoOutputDev.h +++ b/poppler/CairoOutputDev.h @@ -352,8 +352,9 @@ protected: } * groupColorSpaceStack; struct MaskStack { - cairo_pattern_t *mask; - struct MaskStack *next; + cairo_pattern_t *mask; + cairo_matrix_t mask_matrix; + struct MaskStack *next; } *maskStack; GBool haveCSPattern; // set if text has been drawn with a -- 1.7.4.1