poppler/PreScanOutputDev.cc | 16 ++++++++++++++-- poppler/PreScanOutputDev.h | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-)
New commits: commit 1e93c3f2d1c86edd40ca283ed422089f64886d04 Author: William Bader <[email protected]> Date: Sat Mar 15 17:14:21 2014 +0100 Fix regression when creating level1 PS Bug #75241 diff --git a/poppler/PreScanOutputDev.cc b/poppler/PreScanOutputDev.cc index 6a01126..b2af18d 100644 --- a/poppler/PreScanOutputDev.cc +++ b/poppler/PreScanOutputDev.cc @@ -15,7 +15,7 @@ // // Copyright (C) 2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2010, 2011 Albert Astals Cid <[email protected]> -// Copyright (C) 2011 William Bader <[email protected]> +// Copyright (C) 2011, 2014 William Bader <[email protected]> // Copyright (C) 2011, 2013 Thomas Freitag <[email protected]> // Copyright (C) 2011 Adrian Johnson <[email protected]> // @@ -87,7 +87,14 @@ GBool PreScanOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *ca int x0, int y0, int x1, int y1, double xStep, double yStep) { if (paintType == 1) { + GBool tilingNeeded = (x1 - x0 != 1 || y1 - y0 != 1); + if (tilingNeeded) { + inTilingPatternFill++; + } gfx->drawForm(str, resDict, mat, bbox); + if (tilingNeeded) { + inTilingPatternFill--; + } } else { check(state->getFillColorSpace(), state->getFillColor(), state->getFillOpacity(), state->getBlendMode()); @@ -200,7 +207,7 @@ void PreScanOutputDev::drawImageMask(GfxState *state, Object * /*ref*/, Stream * state->getFillOpacity(), state->getBlendMode()); gdi = gFalse; if ((level == psLevel1 || level == psLevel1Sep) && - state->getFillColorSpace()->getMode() == csPattern) { + (state->getFillColorSpace()->getMode() == csPattern || inTilingPatternFill > 0)) { patternImgMask = gTrue; } @@ -238,6 +245,10 @@ void PreScanOutputDev::drawImage(GfxState *state, Object * /*ref*/, Stream *str, transparency = gTrue; } gdi = gFalse; + if ((level == psLevel1 || level == psLevel1Sep) && + inTilingPatternFill > 0) { + patternImgMask = gTrue; + } if (inlineImg) { str->reset(); @@ -354,4 +365,5 @@ void PreScanOutputDev::clearStats() { transparency = gFalse; gdi = gTrue; patternImgMask = gFalse; + inTilingPatternFill = 0; } diff --git a/poppler/PreScanOutputDev.h b/poppler/PreScanOutputDev.h index 0fc9d3e..50fcbf2 100644 --- a/poppler/PreScanOutputDev.h +++ b/poppler/PreScanOutputDev.h @@ -15,7 +15,7 @@ // // Copyright (C) 2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2010 Albert Astals Cid <[email protected]> -// Copyright (C) 2011 William Bader <[email protected]> +// Copyright (C) 2011, 2014 William Bader <[email protected]> // Copyright (C) 2011, 2013 Thomas Freitag <[email protected]> // Copyright (C) 2011 Adrian Johnson <[email protected]> // @@ -176,6 +176,7 @@ private: GBool gdi; PSLevel level; // PostScript level (1, 2, separation) GBool patternImgMask; + int inTilingPatternFill; }; #endif _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
