diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-09 20:01:37 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-10 18:44:57 +0100 |
commit | 81626cb122701420a15dae49ed0e7ec3c442e9d3 (patch) | |
tree | 05c3366c61889c99a2640fa8b398c83adb6f6af9 /fitz/dev_list.c | |
parent | 6d869a15eb33bdda06a737d2af6c04139e2b3bfe (diff) | |
download | mupdf-81626cb122701420a15dae49ed0e7ec3c442e9d3.tar.xz |
Update fz_bound_{text,path} functions.
Pass stroke state into fz_bound_text to allow for stroked text.
Simplifies some calling code.
Add consts to clarify the meanings of the calls.
Diffstat (limited to 'fitz/dev_list.c')
-rw-r--r-- | fitz/dev_list.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fitz/dev_list.c b/fitz/dev_list.c index bd96381d..826d0c46 100644 --- a/fitz/dev_list.c +++ b/fitz/dev_list.c @@ -314,7 +314,7 @@ fz_list_fill_text(fz_device *dev, fz_text *text, const fz_matrix *ctm, node = fz_new_display_node(ctx, FZ_CMD_FILL_TEXT, ctm, colorspace, color, alpha); fz_try(ctx) { - fz_bound_text(dev->ctx, text, ctm, &node->rect); + fz_bound_text(dev->ctx, text, NULL, ctm, &node->rect); node->item.text = fz_clone_text(dev->ctx, text); } fz_catch(ctx) @@ -335,8 +335,7 @@ fz_list_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, cons node->item.text = NULL; fz_try(ctx) { - fz_bound_text(dev->ctx, text, ctm, &node->rect); - fz_adjust_rect_for_stroke(&node->rect, stroke, ctm); + fz_bound_text(dev->ctx, text, stroke, ctm, &node->rect); node->item.text = fz_clone_text(dev->ctx, text); node->stroke = fz_keep_stroke_state(dev->ctx, stroke); } @@ -356,7 +355,7 @@ fz_list_clip_text(fz_device *dev, fz_text *text, const fz_matrix *ctm, int accum node = fz_new_display_node(ctx, FZ_CMD_CLIP_TEXT, ctm, NULL, NULL, 0); fz_try(ctx) { - fz_bound_text(dev->ctx, text, ctm, &node->rect); + fz_bound_text(dev->ctx, text, NULL, ctm, &node->rect); node->item.text = fz_clone_text(dev->ctx, text); node->flag = accumulate; /* when accumulating, be conservative about culling */ @@ -379,8 +378,7 @@ fz_list_clip_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, node = fz_new_display_node(ctx, FZ_CMD_CLIP_STROKE_TEXT, ctm, NULL, NULL, 0); fz_try(ctx) { - fz_bound_text(dev->ctx, text, ctm, &node->rect); - fz_adjust_rect_for_stroke(&node->rect, stroke, ctm); + fz_bound_text(dev->ctx, text, stroke, ctm, &node->rect); node->item.text = fz_clone_text(dev->ctx, text); node->stroke = fz_keep_stroke_state(dev->ctx, stroke); } @@ -400,7 +398,7 @@ fz_list_ignore_text(fz_device *dev, fz_text *text, const fz_matrix *ctm) node = fz_new_display_node(ctx, FZ_CMD_IGNORE_TEXT, ctm, NULL, NULL, 0); fz_try(ctx) { - fz_bound_text(dev->ctx, text, ctm, &node->rect); + fz_bound_text(dev->ctx, text, NULL, ctm, &node->rect); node->item.text = fz_clone_text(dev->ctx, text); } fz_catch(ctx) |