From a34132a9d9559d46077eebdb0dfc2b8395c9f119 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 1 Mar 2011 22:40:14 +0000 Subject: Fix subtle path stroking bug where closepath did not update the pen position. --- draw/pathstroke.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'draw') 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; } } -- cgit v1.2.3