Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane LOEUILLET <stephane.loeuillet@tiscali.fr>2005-01-23 18:15:07 (GMT)
committer Martin Kretzschmar <martink@src.gnome.org>2005-01-23 18:15:07 (GMT)
commite88fdc41fa5cec99684fdef7d7063c67a8eb917f (patch)
tree6bb9817132bf24bc30c6fbaca178b90e125450a6
parent9b18b9b8de0aa7eae249ee872f34011b32266961 (diff)
divide by scale at the right time. Bug #164996
2005-01-23 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr> * pdf/xpdf/pdf-document.cc (pdf_document_get_link): divide by scale at the right time. Bug #164996
-rw-r--r--ChangeLog5
-rw-r--r--pdf/xpdf/pdf-document.cc12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eda2e7..c50966d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-23 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr>
+
+ * pdf/xpdf/pdf-document.cc (pdf_document_get_link): divide by
+ scale at the right time. Bug #164996
+
2005-01-22 Martin Kretzschmar <martink@gnome.org>
* pdf/xpdf/GlobalParams.cc: My 2005-01-05 change didn't actually
diff --git a/pdf/xpdf/pdf-document.cc b/pdf/xpdf/pdf-document.cc
index 96b1132..8449752 100644
--- a/pdf/xpdf/pdf-document.cc
+++ b/pdf/xpdf/pdf-document.cc
@@ -1045,17 +1045,17 @@ pdf_document_get_link (EvDocument *document, int x, int y)
return NULL;
}
- /* Zoom */
- link_x = x / pdf_document->scale;
- link_y = y / pdf_document->scale;
-
/* Offset */
- link_x -= pdf_document->page_x_offset;
- link_y -= pdf_document->page_y_offset;
+ link_x = x - pdf_document->page_x_offset;
+ link_y = y - pdf_document->page_y_offset;
/* Inverse y */
link_y = pdf_document->out->getBitmapHeight() - link_y;
+ /* Zoom */
+ link_x = link_x / pdf_document->scale;
+ link_y = link_y / pdf_document->scale;
+
action = pdf_document->links->find (link_x, link_y);
if (action) {