On Thursday, October 04, 2012 01:00:29 AM Fabio D'Urso wrote:
> 1) The attached document is rendered in a completely different way
> than in acroread: we show the icon bottom-left, acroread shows it top-left.

Patch attached. It creates the 24x24 starting from the top-left corner instead 
of the bottom-left corner.

Fabio
From ab5806a2fa5ce6f338d307efa6cb86503b7f502d Mon Sep 17 00:00:00 2001
From: Fabio D'Urso <[email protected]>
Date: Thu, 4 Oct 2012 11:20:42 +0200
Subject: [PATCH] Create the 24x24 rectangle for text annotation icons from
 the top-left corner instead of bottom-left

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

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 53cbb67..805203e 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2392,7 +2392,7 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
     appearBuf->append ("Q\n");
 
     // Force 24x24 rectangle
-    PDFRectangle fixedRect(rect->x1, rect->y1, rect->x1 + 24, rect->y1 + 24);
+    PDFRectangle fixedRect(rect->x1, rect->y2 - 24, rect->x1 + 24, rect->y2);
     appearBBox = new AnnotAppearanceBBox(&fixedRect);
     double bbox[4];
     appearBBox->getBBoxRect(bbox);
-- 
1.7.6.5

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to