[poppler] 2 commits - poppler/Annot.cc poppler/Gfx.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Apr 17 13:44:05 PDT 2012


 poppler/Annot.cc |    2 +-
 poppler/Gfx.cc   |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 80d4e1843c56801508f476fed64ecb3201ba18c8
Author: Fabio D'Urso <fabiodurso at hotmail.it>
Date:   Tue Apr 17 20:25:57 2012 +0200

    Do not draw border in AnnotText::draw

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 5d03e33..130b9bb 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2303,7 +2303,7 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   appearance.fetch(xref, &obj);
-  gfx->drawAnnot(&obj, border, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
 		 rect->x1, rect->y1, rectx2, recty2);
   obj.free();
 }
commit a1e3d868ccd7fb84d52d94754d8681c97119fb6e
Author: Fabio D'Urso <fabiodurso at hotmail.it>
Date:   Fri Mar 30 21:52:04 2012 +0200

    Save/restore gfx state when drawing annot border

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 958194b..e9d6ac3 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -35,6 +35,7 @@
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
 // Copyright (C) 2011 Axel Strübing <axel.struebing at freenet.de>
 // Copyright (C) 2012 Even Rouault <even.rouault at mines-paris.org>
+// Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -5178,6 +5179,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
 
   // draw the border
   if (border && border->getWidth() > 0) {
+    saveState();
     if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) {
       state->setStrokePattern(NULL);
       state->setStrokeColorSpace(new GfxDeviceRGBColorSpace());
@@ -5216,6 +5218,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
       state->closePath();
     }
     out->stroke(state);
+    restoreState();
   }
 }
 


More information about the poppler mailing list