diff options
-rw-r--r-- | draw/pathstroke.c | 9 | ||||
-rw-r--r-- | fitz/dev_trace.c | 1 | ||||
-rw-r--r-- | fitz/res_path.c | 5 |
3 files changed, 8 insertions, 7 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; } } diff --git a/fitz/dev_trace.c b/fitz/dev_trace.c index 84e590bf..50ba02f3 100644 --- a/fitz/dev_trace.c +++ b/fitz/dev_trace.c @@ -54,6 +54,7 @@ fz_tracepath(fz_path *path, int indent) break; case FZ_CLOSEPATH: printf("<closepath />\n"); + break; } } } diff --git a/fitz/res_path.c b/fitz/res_path.c index 6c5f1802..ebfb3cdc 100644 --- a/fitz/res_path.c +++ b/fitz/res_path.c @@ -19,10 +19,8 @@ fz_clonepath(fz_path *old) fz_path *path; path = fz_malloc(sizeof(fz_path)); - memcpy(path, old, sizeof(fz_path)); - path->len = old->len; - path->cap = path->len; + path->cap = old->len; path->els = fz_calloc(path->cap, sizeof(fz_pathel)); memcpy(path->els, old->els, sizeof(fz_pathel) * path->len); @@ -207,6 +205,7 @@ fz_debugpath(fz_path *path, int indent) break; case FZ_CLOSEPATH: printf("h\n"); + break; } } } |