summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-07-29 11:43:57 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2013-07-29 11:43:57 +0100
commit0d6739f742310aee9e3aa8ca06895849d7e64648 (patch)
tree2dc2825397d8fa6307d1302056f81a3435318329 /include
parent9eb5dbcb3c884a1573d1a78b00dd345635fec0db (diff)
downloadmupdf-0d6739f742310aee9e3aa8ca06895849d7e64648.tar.xz
Add support for freetext annotations
This initial commit doesn't entirely complete the task: 1) There are a couple of ucs<->winansi conversions left out, 2) The text displayed by the appearance string can slightly overflow the annotation rectangle.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/pdf/annot.h8
-rw-r--r--include/mupdf/pdf/appearance.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h
index b0086773..d6950970 100644
--- a/include/mupdf/pdf/annot.h
+++ b/include/mupdf/pdf/annot.h
@@ -86,11 +86,17 @@ void pdf_delete_annot(pdf_document *doc, pdf_page *page, pdf_annot *annot);
void pdf_set_markup_annot_quadpoints(pdf_document *doc, pdf_annot *annot, fz_point *qp, int n);
/*
- fz_set_ink_annot_list: set the details of an ink annotation. All the points of the multiple arcs
+ pdf_set_ink_annot_list: set the details of an ink annotation. All the points of the multiple arcs
are carried in a single array, with the counts for each arc held in a secondary array.
*/
void pdf_set_ink_annot_list(pdf_document *doc, pdf_annot *annot, fz_point *pts, int *counts, int ncount, float color[3], float thickness);
+/*
+ pdf_set_free_text_details: set the position, text, font and color for a free text annotation.
+ Only base 14 fonts are supported and are specified by name.
+*/
+void pdf_set_free_text_details(pdf_document *doc, pdf_annot *annot, fz_point *pos, char *text, char *font_name, float font_size, float color[3]);
+
fz_annot_type pdf_annot_obj_type(pdf_obj *obj);
/*
diff --git a/include/mupdf/pdf/appearance.h b/include/mupdf/pdf/appearance.h
index ead8bfa5..19a7ffbf 100644
--- a/include/mupdf/pdf/appearance.h
+++ b/include/mupdf/pdf/appearance.h
@@ -30,6 +30,12 @@ void pdf_set_annot_appearance(pdf_document *doc, pdf_annot *annot, fz_rect *rect
*/
void pdf_set_markup_appearance(pdf_document *doc, pdf_annot *annot, float color[3], float alpha, float line_thickness, float line_height);
+/*
+ pdf_update_free_text_annot_appearance: update the appearance stream for a free text
+ annotation, basing it on the annoations rectangle and contents.
+*/
+void pdf_update_free_text_annot_appearance(pdf_document *doc, pdf_annot *annot);
+
void pdf_set_ink_appearance(pdf_document *doc, pdf_annot *annot);
#endif