diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-22 11:09:22 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-22 11:11:46 +0100 |
commit | 15b9cdd84caf784abeb911ca7aaf1d317d201e88 (patch) | |
tree | c00b6469e77734967e74bfef80a9bd8b902b0054 /include | |
parent | 9371668e28e5063ae42b8cd1906f27ee7b33379e (diff) | |
download | mupdf-15b9cdd84caf784abeb911ca7aaf1d317d201e88.tar.xz |
Collect together all code to do with appearance-stream creation
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf.h | 1 | ||||
-rw-r--r-- | include/mupdf/pdf/annot.h | 13 | ||||
-rw-r--r-- | include/mupdf/pdf/appearance.h | 35 |
3 files changed, 36 insertions, 13 deletions
diff --git a/include/mupdf/pdf.h b/include/mupdf/pdf.h index c2e069a9..976aaa07 100644 --- a/include/mupdf/pdf.h +++ b/include/mupdf/pdf.h @@ -17,6 +17,7 @@ #include "mupdf/pdf/annot.h" #include "mupdf/pdf/field.h" #include "mupdf/pdf/widget.h" +#include "mupdf/pdf/appearance.h" #include "mupdf/pdf/event.h" #include "mupdf/pdf/javascript.h" diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 77066569..b0086773 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -81,28 +81,15 @@ pdf_annot *pdf_create_annot(pdf_document *doc, pdf_page *page, fz_annot_type typ void pdf_delete_annot(pdf_document *doc, pdf_page *page, pdf_annot *annot); /* - pdf_set_annot_appearance: update the appearance of an annotation based - on a display list. -*/ -void pdf_set_annot_appearance(pdf_document *doc, pdf_annot *annot, fz_rect *rect, fz_display_list *disp_list); - -/* pdf_set_markup_annot_quadpoints: set the quadpoints for a text-markup annotation. */ void pdf_set_markup_annot_quadpoints(pdf_document *doc, pdf_annot *annot, fz_point *qp, int n); /* - fz_set_markup_appearance: set the appearance stream of a text markup annotations, basing it on - its QuadPoints array -*/ -void pdf_set_markup_appearance(pdf_document *doc, pdf_annot *annot, float color[3], float alpha, float line_thickness, float line_height); - -/* fz_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); -void pdf_set_ink_appearance(pdf_document *doc, pdf_annot *annot); fz_annot_type pdf_annot_obj_type(pdf_obj *obj); diff --git a/include/mupdf/pdf/appearance.h b/include/mupdf/pdf/appearance.h new file mode 100644 index 00000000..ead8bfa5 --- /dev/null +++ b/include/mupdf/pdf/appearance.h @@ -0,0 +1,35 @@ +#ifndef MUPDF_PDF_APPEARANCE_H +#define MUPDF_PDF_APPEARANCE_H + +typedef struct pdf_da_info_s +{ + char *font_name; + int font_size; + float col[4]; + int col_size; +} pdf_da_info; + +void pdf_da_info_fin(fz_context *ctx, pdf_da_info *di); +void pdf_parse_da(fz_context *ctx, char *da, pdf_da_info *di); +void pdf_fzbuf_print_da(fz_context *ctx, fz_buffer *fzbuf, pdf_da_info *di); + +void pdf_update_text_appearance(pdf_document *doc, pdf_obj *obj, char *eventValue); +void pdf_update_combobox_appearance(pdf_document *doc, pdf_obj *obj); +void pdf_update_pushbutton_appearance(pdf_document *doc, pdf_obj *obj); +void pdf_update_text_markup_appearance(pdf_document *doc, pdf_annot *annot, fz_annot_type type); + +/* + pdf_set_annot_appearance: update the appearance of an annotation based + on a display list. +*/ +void pdf_set_annot_appearance(pdf_document *doc, pdf_annot *annot, fz_rect *rect, fz_display_list *disp_list); + +/* + fz_set_markup_appearance: set the appearance stream of a text markup annotations, basing it on + its QuadPoints array +*/ +void pdf_set_markup_appearance(pdf_document *doc, pdf_annot *annot, float color[3], float alpha, float line_thickness, float line_height); + +void pdf_set_ink_appearance(pdf_document *doc, pdf_annot *annot); + +#endif |