summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-03-18 10:59:43 +0000
committerRobin Watts <robin.watts@artifex.com>2013-03-18 11:32:55 +0000
commit65d12cd5b97b4b6b43767713917bb422e7e1a834 (patch)
tree4a6096af48082192f87754c75fc3c561ef69528d /fitz
parent1b4b5fdfa6b74827631d42efd2a61226125f036b (diff)
downloadmupdf-65d12cd5b97b4b6b43767713917bb422e7e1a834.tar.xz
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.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/doc_interactive.c5
-rw-r--r--fitz/fitz-internal.h6
2 files changed, 11 insertions, 0 deletions
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
@@ -1217,6 +1217,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.
*
* The trm field contains the a, b, c and d coefficients.