[evince/gnome-3-8] ensure top/bottom and left/right relations for /FitR boxes
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-8] ensure top/bottom and left/right relations for /FitR boxes
- Date: Mon, 13 May 2013 16:53:33 +0000 (UTC)
commit c710f3ff9c170ea1e3b97a3a860242417e7f60a2
Author: Simon Budig <simon budig de>
Date: Sun Mar 10 01:15:45 2013 +0100
ensure top/bottom and left/right relations for /FitR boxes
adresses the usability problem described in
https://bugzilla.gnome.org/show_bug.cgi?id=695524
backend/pdf/ev-poppler.cc | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index b2b8e04..883de2d 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -1273,11 +1273,13 @@ ev_link_dest_from_dest (PdfDocument *pdf_document,
poppler_page = poppler_document_get_page (pdf_document->document,
MAX (0, dest->page_num - 1));
poppler_page_get_size (poppler_page, NULL, &height);
+ /* for evince we ensure that bottom <= top and left <= right */
+ /* also evince has its origin in the top left, so we invert the y axis. */
ev_dest = ev_link_dest_new_fitr (dest->page_num - 1,
- dest->left,
- height - MIN (height, dest->bottom),
- dest->right,
- height - MIN (height, dest->top));
+ MIN (dest->left, dest->right),
+ height - MIN (height, MIN (dest->bottom, dest->top)),
+ MAX (dest->left, dest->right),
+ height - MIN (height, MAX (dest->bottom,
dest->top)));
g_object_unref (poppler_page);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]