[evince/wip/highlight: 4/16] pdf: saving evince highlight annotation to poppler



commit 7c1f0bb832693f3eda8442c8ab795b12b98d1632
Author: Giselle Reis <gisellemnr src gnome org>
Date:   Thu Aug 7 17:19:09 2014 +0200

    pdf: saving evince highlight annotation to poppler
    
    Creates a poppler highlight annotation from evince's
    highlight annotation.
    
    Depends on poppler patch that implements
    poppler_page_get_quadrilaterals_for_area.

 backend/pdf/ev-poppler.cc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index d6a3b6a..44ade1c 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -3170,6 +3170,14 @@ pdf_document_annotations_add_annotation (EvDocumentAnnotations *document_annotat
                                                     get_poppler_annot_text_icon (icon));
                        }
                        break;
+               case EV_ANNOTATION_TYPE_HIGHLIGHT: {
+                       GArray *quads;
+
+                       quads = poppler_page_get_quadrilaterals_for_area (poppler_page, &poppler_rect, NULL);
+                       poppler_annot = poppler_annot_text_markup_new_highlight (pdf_document->document, 
&poppler_rect, quads);
+                       g_array_unref (quads);
+               }
+                       break;
                default:
                        g_assert_not_reached ();
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]