diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-09 12:25:18 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-01-09 19:58:41 +0000 |
commit | 2d20efaa9ccc4e30a05900521543af9d353fc49a (patch) | |
tree | 65a104945f78780c17cc14b4887b5eb6eeb51b67 /draw/draw_path.c | |
parent | 41826915a2abe9ef1586c7cd58ae2af9d6a07fd3 (diff) | |
download | mupdf-2d20efaa9ccc4e30a05900521543af9d353fc49a.tar.xz |
Fix Bug 692356 (comment #2)
Take on a modified version of Zenikos patch; only take the quick
exit if the whole dash length is small, or if the dash_length
scaled up by the maximum possible scale in the ctm is less than
1/2 a pixel.
Diffstat (limited to 'draw/draw_path.c')
-rw-r--r-- | draw/draw_path.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/draw/draw_path.c b/draw/draw_path.c index ca33f5f2..d6f9934b 100644 --- a/draw/draw_path.c +++ b/draw/draw_path.c @@ -723,7 +723,7 @@ fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_mat { struct sctx s; fz_point p0, p1, p2, p3, beg; - float phase_len; + float phase_len, max_expand; int i; s.gel = gel; @@ -752,7 +752,8 @@ fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_mat phase_len = 0; for (i = 0; i < stroke->dash_len; i++) phase_len += stroke->dash_list[i]; - if (phase_len < 0.01f || phase_len < stroke->linewidth * 0.5f) + max_expand = MAX(MAX(fabs(ctm.a),fabs(ctm.b)),MAX(fabs(ctm.c),fabs(ctm.d))); + if (phase_len < 0.01f || phase_len * max_expand < 0.5f) { fz_flatten_stroke_path(gel, path, stroke, ctm, flatness, linewidth); return; |