fixed link position in poly2bitmap
authorMatthias Kramm <kramm@quiss.org>
Wed, 19 May 2010 22:31:14 +0000 (15:31 -0700)
committerMatthias Kramm <kramm@quiss.org>
Wed, 19 May 2010 22:31:14 +0000 (15:31 -0700)
lib/pdf/BitmapOutputDev.cc
lib/pdf/BitmapOutputDev.h

index 5c005d0..7b7b6a5 100644 (file)
@@ -914,13 +914,7 @@ void BitmapOutputDev::finishPage()
     msg("<verbose> 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("<debug> 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,
index 69309fc..91e110a 100644 (file)
@@ -188,6 +188,7 @@ public:
 
     
 private:
+    void flushEverything();
     void clearClips();
     void clearBoolPolyDev();
     void clearBoolTextDev();