[poppler] poppler/Annot.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Apr 6 14:08:08 PDT 2010


 poppler/Annot.cc |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 198c9d61ba93ba62ea2da44a23cd948d43556c3e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Apr 6 22:00:14 2010 +0100

    Use the topleft of the Rect of text annots to draw
    
    Not use the full rect when we are drawing "our" notes

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 4725686..54faadf 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2006 Scott Turner <scotty1024 at mac.com>
 // Copyright (C) 2007, 2008 Julien Rebetez <julienr at svn.gnome.org>
-// Copyright (C) 2007-2009 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2007-2010 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2007-2010 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez at gmail.com>
 // Copyright (C) 2007 Jeff Muizelaar <jeff at infidigm.net>
@@ -1847,6 +1847,8 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
   if (!isVisible (printing))
     return;
 
+  double rectx2 = rect->x2;
+  double recty2 = rect->y2;
   if (appearance.isNull()) {
     ca = opacity;
 
@@ -1894,12 +1896,15 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
     appearStream->setNeedFree(gTrue);
     appearance.initStream(appearStream);
     delete appearBuf;
+
+    rectx2 = rect->x1 + 24;
+    recty2 = rect->y1 + 24;
   }
 
   // draw the appearance stream
   appearance.fetch(xref, &obj);
   gfx->drawAnnot(&obj, border, color, ca,
-		 rect->x1, rect->y1, rect->x2, rect->y2);
+		 rect->x1, rect->y1, rectx2, recty2);
   obj.free();
 }
 


More information about the poppler mailing list