From b3149be5af9d7f377e71a9fa8805feb033e59447 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 25 Aug 2009 23:22:06 +0200 Subject: Add implicit closepath segments when filling non-closed subpaths. --- fitzdraw/pathfill.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fitzdraw') diff --git a/fitzdraw/pathfill.c b/fitzdraw/pathfill.c index e74fd879..75d30cc5 100644 --- a/fitzdraw/pathfill.c +++ b/fitzdraw/pathfill.c @@ -82,6 +82,14 @@ fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness) switch (path->els[i++].k) { case FZ_MOVETO: + /* implicit closepath before moveto */ + if (i && (cx != bx || cy != by)) + { + error = line(gel, &ctm, cx, cy, bx, by); + if (error) + return error; + } + x1 = path->els[i++].v; y1 = path->els[i++].v; cx = bx = x1; -- cgit v1.2.3