X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FBitmapOutputDev.cc;h=7b7b6a564c5f6ae5ef4a86be3260386570c1d33c;hp=5c005d035d8f900484d89bb2a5076661057f2245;hb=6468644eca8b699a42a9c68048da87b90764f385;hpb=ccfad5f029388c5d9d02297470c608e030536db3 diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 5c005d0..7b7b6a5 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -914,13 +914,7 @@ void BitmapOutputDev::finishPage() msg(" finishPage (BitmapOutputDev)"); gfxdev->endPage(); - if(layerstate == STATE_BITMAP_IS_ABOVE) { - this->flushText(); - this->flushBitmap(); - } else { - this->flushBitmap(); - this->flushText(); - } + flushEverything(); /* splash will now destroy alpha, and paint the background color into the "holes" in the bitmap */ @@ -1785,8 +1779,19 @@ void BitmapOutputDev::drawForm(Ref id) void BitmapOutputDev::processLink(Link *link, Catalog *catalog) { msg(" processLink"); + flushEverything(); gfxdev->processLink(link, catalog); } +void BitmapOutputDev::flushEverything() +{ + if(layerstate == STATE_BITMAP_IS_ABOVE) { + this->flushText(); + this->flushBitmap(); + } else { + this->flushBitmap(); + this->flushText(); + } +} void BitmapOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace *blendingColorSpace,