diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index ab0722a..eb45b16 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -2901,7 +2901,6 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, state->shiftCTM(-tx, -ty); updateCTM(state, 0, 0, 0, 0, 0, 0); } - void SplashOutputDev::endTransparencyGroup(GfxState *state) { double *ctm; @@ -2937,9 +2936,9 @@ void SplashOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bb delete transpGroup; delete tBitmap; -} + } -void SplashOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/, +void SplashOutputDev::setSoftMask(GfxState * state, double * /*bbox*/, GBool alpha, Function *transferFunc, GfxColor *backdropColor) { SplashBitmap *softMask, *tBitmap; @@ -3002,7 +3001,8 @@ void SplashOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/, softMask = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), 1, splashModeMono8, gFalse); - memset(softMask->getDataPtr(), 0, + unsigned char fill = (state->getAlphaIsShape()) ? 255 : 0; + memset(softMask->getDataPtr(), fill, softMask->getRowSize() * softMask->getHeight()); p = softMask->getDataPtr() + ty * softMask->getRowSize() + tx; int xMax = tBitmap->getWidth();