diff options
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; |