From 6468644eca8b699a42a9c68048da87b90764f385 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 19 May 2010 15:31:14 -0700 Subject: [PATCH] fixed link position in poly2bitmap --- lib/pdf/BitmapOutputDev.cc | 19 ++++++++++++------- lib/pdf/BitmapOutputDev.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) 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, diff --git a/lib/pdf/BitmapOutputDev.h b/lib/pdf/BitmapOutputDev.h index 69309fc..91e110a 100644 --- a/lib/pdf/BitmapOutputDev.h +++ b/lib/pdf/BitmapOutputDev.h @@ -188,6 +188,7 @@ public: private: + void flushEverything(); void clearClips(); void clearBoolPolyDev(); void clearBoolTextDev(); -- 1.7.10.4