]> www.fi.muni.cz Git - evince.git/commitdiff
divide by scale at the right time. Bug #164996
authorStephane LOEUILLET <stephane.loeuillet@tiscali.fr>
Sun, 23 Jan 2005 18:15:07 +0000 (18:15 +0000)
committerMartin Kretzschmar <martink@src.gnome.org>
Sun, 23 Jan 2005 18:15:07 +0000 (18:15 +0000)
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

ChangeLog
pdf/xpdf/pdf-document.cc

index 4eda2e711522b7dad61487882232b9b12f718511..c50966d8f52eecd70fc47eecf24b9a06f8603682 100644 (file)
--- 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
index 96b11325a9dfee1906a3f98f0ff1b8b201aab9eb..8449752bd80287ac9a06c7e4af77a80368357b1e 100644 (file)
@@ -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) {