diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-03-01 22:40:14 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-03-01 22:40:14 +0000 |
commit | a34132a9d9559d46077eebdb0dfc2b8395c9f119 (patch) | |
tree | 1f1c19381151e148164854379951e01a9dc876a7 /draw | |
parent | 48fa19c8e1117ac556e277e0924833d124a5faea (diff) | |
download | mupdf-a34132a9d9559d46077eebdb0dfc2b8395c9f119.tar.xz |
Fix subtle path stroking bug where closepath did not update the pen position.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/pathstroke.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/draw/pathstroke.c b/draw/pathstroke.c index 50343b3f..1eb514eb 100644 --- a/draw/pathstroke.c +++ b/draw/pathstroke.c @@ -271,8 +271,6 @@ fz_strokeflush(struct sctx *s) { fz_linedot(s, s->beg[0]); } - - s->dot = 0; } static void @@ -283,6 +281,7 @@ fz_strokemoveto(struct sctx *s, fz_point cur) s->beg[0] = cur; s->sn = 1; s->bn = 1; + s->dot = 0; } static void @@ -328,8 +327,9 @@ fz_strokeclosepath(struct sctx *s) fz_linedot(s, s->beg[0]); } - s->bn = 0; - s->sn = 0; + s->seg[0] = s->beg[0]; + s->bn = 1; + s->sn = 1; s->dot = 0; } @@ -644,6 +644,7 @@ fz_dashpath(fz_gel *gel, fz_path *path, fz_strokestate *stroke, fz_matrix ctm, f case FZ_CLOSEPATH: fz_dashlineto(&s, beg); + p0 = p1 = beg; break; } } |