[evince] pdf: Added support to save popup rectangles to pdf backend
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] pdf: Added support to save popup rectangles to pdf backend
- Date: Sat, 18 Apr 2015 10:38:06 +0000 (UTC)
commit 0bf74fc2d3a279894aa24fa36168412725605643
Author: Philipp Reinkemeier <philipp reinkemeier offis de>
Date: Fri Feb 20 10:03:19 2015 +0100
pdf: Added support to save popup rectangles to pdf backend
https://bugzilla.gnome.org/show_bug.cgi?id=744886
backend/pdf/ev-poppler.cc | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 554756f..20bcd94 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -3342,6 +3342,24 @@ pdf_document_annotations_save_annotation (EvDocumentAnnotations *document_annota
poppler_annot_markup_set_label (markup, ev_annotation_markup_get_label (ev_markup));
if (mask & EV_ANNOTATIONS_SAVE_OPACITY)
poppler_annot_markup_set_opacity (markup, ev_annotation_markup_get_opacity
(ev_markup));
+ if (mask & EV_ANNOTATIONS_SAVE_POPUP_RECT) {
+ EvPage *page;
+ EvRectangle ev_rect;
+ PopplerRectangle poppler_rect;
+ gdouble height;
+
+ page = ev_annotation_get_page (annot);
+ poppler_page_get_size (POPPLER_PAGE (page->backend_page),
+ NULL, &height);
+ ev_annotation_markup_get_rectangle (ev_markup, &ev_rect);
+
+ poppler_rect.x1 = ev_rect.x1;
+ poppler_rect.x2 = ev_rect.x2;
+ poppler_rect.y1 = height - ev_rect.y2;
+ poppler_rect.y2 = height - ev_rect.y1;
+
+ poppler_annot_markup_set_popup (markup, &poppler_rect);
+ }
if (mask & EV_ANNOTATIONS_SAVE_POPUP_IS_OPEN)
poppler_annot_markup_set_popup_is_open (markup,
ev_annotation_markup_get_popup_is_open (ev_markup));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]