diff --git a/cameo/area.c b/cameo/area.c index 01057c9..17a8ccf 100644 --- a/cameo/area.c +++ b/cameo/area.c @@ -267,6 +267,18 @@ printf(" x=%g\n", x); } +static void add_outline(const struct path *path, int inside, struct path **res) +{ + struct path *new; + int left; + + left = path_tool_is_left(path); + new = path_offset(path, inside ? !left : left, 0); + new->next = *res; + *res = new; +} + + static void fill_path(const struct path *paths, const struct path *path, double r_tool, double overlap, struct path **res) { @@ -292,8 +304,10 @@ printf("x[%g:%g] y[%g:%g] n=%d\n", xa, xb, ya, yb, n); for (s2 = sub2; *s2; s2++) fill_path(paths, *s2, r_tool, overlap, res); free(sub2); + add_outline(*s, 0, res); } free(sub); + add_outline(path, 1, res); } diff --git a/cameo/test/doit b/cameo/test/doit index d4ef1f8..1b2c199 100755 --- a/cameo/test/doit +++ b/cameo/test/doit @@ -1,10 +1,6 @@ #!/bin/sh ../cameo <