diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-01 21:09:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-01 21:09:09 +0200 |
commit | ad32e9928b6ffba6513a6aba367ae3d4f931f32a (patch) | |
tree | f1cd53a2fdd77ea11551a6d518efa9cb54e3b533 /draw/draw_path.c | |
parent | 00367c42db4c5c2d2db6cf823f59b7ea6daa8376 (diff) | |
download | mupdf-ad32e9928b6ffba6513a6aba367ae3d4f931f32a.tar.xz |
Only draw dots for zero-length line segments with round line caps.
Diffstat (limited to 'draw/draw_path.c')
-rw-r--r-- | draw/draw_path.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/draw/draw_path.c b/draw/draw_path.c index 45731c7c..96ed6a4a 100644 --- a/draw/draw_path.c +++ b/draw/draw_path.c @@ -413,7 +413,8 @@ fz_stroke_lineto(struct sctx *s, fz_point cur) if (dx * dx + dy * dy < FLT_EPSILON) { - s->dot = 1; + if (s->cap == ROUND || s->dash_list) + s->dot = 1; return; } @@ -529,6 +530,13 @@ fz_flatten_stroke_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_m s.bn = 0; s.dot = 0; + s.dash_list = NULL; + s.dash_phase = 0; + s.dash_len = 0; + s.toggle = 0; + s.offset = 0; + s.phase = 0; + i = 0; if (path->len > 0 && path->items[0].k != FZ_MOVETO) |