From 65d12cd5b97b4b6b43767713917bb422e7e1a834 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Mon, 18 Mar 2013 10:59:43 +0000 Subject: Auto-generate appearance streams for strikeout, underline, highlight This fixes bug #693664, and also simplifies app code. The example file attached to the bug produces strange results, but that is because the QuadPoint information is incorrect. --- fitz/doc_interactive.c | 5 +++++ fitz/fitz-internal.h | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'fitz') diff --git a/fitz/doc_interactive.c b/fitz/doc_interactive.c index a14b87d6..fb9d6cb4 100644 --- a/fitz/doc_interactive.c +++ b/fitz/doc_interactive.c @@ -106,6 +106,11 @@ void fz_set_markup_annot_quadpoints(fz_interactive *idoc, fz_annot *annot, fz_po pdf_set_markup_annot_quadpoints((pdf_document *)idoc, (pdf_annot *)annot, qp, n); } +void fz_set_markup_appearance(fz_interactive *idoc, fz_annot *annot, float color[3], float alpha, float line_thickness, float line_height) +{ + pdf_set_markup_appearance((pdf_document *)idoc, (pdf_annot *)annot, color, alpha, line_thickness, line_height); +} + void fz_set_doc_event_callback(fz_interactive *idoc, fz_doc_event_cb *event_cb, void *data) { pdf_set_doc_event_callback((pdf_document *)idoc, event_cb, data); diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h index d0fc01e2..00c59cc5 100644 --- a/fitz/fitz-internal.h +++ b/fitz/fitz-internal.h @@ -1216,6 +1216,12 @@ void fz_set_annot_appearance(fz_interactive *idoc, fz_annot *annot, fz_rect *rec */ void fz_set_markup_annot_quadpoints(fz_interactive *idoc, fz_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 fz_set_markup_appearance(fz_interactive *idoc, fz_annot *annot, float color[3], float alpha, float line_thickness, float line_height); + /* * Text buffer. * -- cgit v1.2.3