summaryrefslogtreecommitdiff
path: root/fitzdraw
diff options
context:
space:
mode:
Diffstat (limited to 'fitzdraw')
-rw-r--r--fitzdraw/pathfill.c8
1 files changed, 8 insertions, 0 deletions
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;