summaryrefslogtreecommitdiff
path: root/fitz/res_text.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-05-09 20:01:37 +0100
committerRobin Watts <robin.watts@artifex.com>2013-05-10 18:44:57 +0100
commit81626cb122701420a15dae49ed0e7ec3c442e9d3 (patch)
tree05c3366c61889c99a2640fa8b398c83adb6f6af9 /fitz/res_text.c
parent6d869a15eb33bdda06a737d2af6c04139e2b3bfe (diff)
downloadmupdf-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/res_text.c')
-rw-r--r--fitz/res_text.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fitz/res_text.c b/fitz/res_text.c
index 09a658b1..57e02cf9 100644
--- a/fitz/res_text.c
+++ b/fitz/res_text.c
@@ -53,7 +53,7 @@ fz_clone_text(fz_context *ctx, fz_text *old)
}
fz_rect *
-fz_bound_text(fz_context *ctx, fz_text *text, const fz_matrix *ctm, fz_rect *bbox)
+fz_bound_text(fz_context *ctx, fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *bbox)
{
fz_matrix tm, trm;
fz_rect gbox;
@@ -90,12 +90,16 @@ fz_bound_text(fz_context *ctx, fz_text *text, const fz_matrix *ctm, fz_rect *bbo
}
}
+ if (stroke)
+ fz_adjust_rect_for_stroke(bbox, stroke, ctm);
+
/* Compensate for the glyph cache limited positioning precision */
bbox->x0 -= 1;
bbox->y0 -= 1;
bbox->x1 += 1;
bbox->y1 += 1;
+
return bbox;
}