From: kramm Date: Wed, 19 Mar 2008 21:48:45 +0000 (+0000) Subject: fixed crash and offset error in transparency groups X-Git-Tag: buttons-working~383 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=b3c3a691bfb5d1d06c086744f1ba7d8061379772 fixed crash and offset error in transparency groups --- diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 061e8ae..d0dafa8 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -617,7 +617,7 @@ void BitmapOutputDev::setDefaultCTM(double *ctm) rgbdev->setDefaultCTM(ctm); clip0dev->setDefaultCTM(ctm); clip1dev->setDefaultCTM(ctm); - //gfxdev->setDefaultCTM(ctm);//? + gfxdev->setDefaultCTM(ctm); } void BitmapOutputDev::saveState(GfxState *state) { @@ -1191,16 +1191,24 @@ void BitmapOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GBool forSoftMask) { msg(" beginTransparencyGroup"); - boolpolydev->beginTransparencyGroup(state, bbox, blendingColorSpace, isolated, knockout, forSoftMask); - rgbdev->beginTransparencyGroup(state, bbox, blendingColorSpace, isolated, knockout, forSoftMask); + GfxState*state1 = state->copy(gTrue); + GfxState*state2 = state->copy(gTrue); + boolpolydev->beginTransparencyGroup(state1, bbox, blendingColorSpace, isolated, knockout, forSoftMask); + rgbdev->beginTransparencyGroup(state2, bbox, blendingColorSpace, isolated, knockout, forSoftMask); clip1dev->beginTransparencyGroup(state, bbox, blendingColorSpace, isolated, knockout, forSoftMask); + delete state1; + delete state2; } void BitmapOutputDev::endTransparencyGroup(GfxState *state) { msg(" endTransparencyGroup"); - boolpolydev->endTransparencyGroup(state); + GfxState*state1 = state->copy(gTrue); + GfxState*state2 = state->copy(gTrue); + boolpolydev->endTransparencyGroup(state1); checkNewBitmap(); - rgbdev->endTransparencyGroup(state); + rgbdev->endTransparencyGroup(state2); + delete state1; + delete state2; clip1dev->endTransparencyGroup(state); } void BitmapOutputDev::paintTransparencyGroup(GfxState *state, double *bbox) @@ -1209,6 +1217,7 @@ void BitmapOutputDev::paintTransparencyGroup(GfxState *state, double *bbox) boolpolydev->paintTransparencyGroup(state,bbox); checkNewBitmap(); rgbdev->paintTransparencyGroup(state,bbox); + clip1dev->paintTransparencyGroup(state,bbox); } void BitmapOutputDev::setSoftMask(GfxState *state, double *bbox, GBool alpha, Function *transferFunc, GfxColor *backdropColor) {