summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cairo.c3
-rw-r--r--svg.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/cairo.c b/cairo.c
index 23dd628..0683848 100644
--- a/cairo.c
+++ b/cairo.c
@@ -28,6 +28,9 @@ void output_cairo(struct pes *pes, const char *filename, int size, double densit
struct stitch *stitch = block->stitch;
int i;
+ if (!block->nr_stitches)
+ continue;
+
cairo_set_source_rgb(cr, c->r / 255.0, c->g / 255.0, c->b / 255.0);
cairo_move_to(cr, X(stitch), Y(stitch));
diff --git a/svg.c b/svg.c
index 1237a64..d1c81f0 100644
--- a/svg.c
+++ b/svg.c
@@ -14,6 +14,9 @@ void output_svg(struct pes *pes)
pes->max_y - pes->min_y);
for (struct pes_block *block = pes->blocks; block; block = block->next) {
+ if (!block->nr_stitches)
+ continue;
+
int i;
printf("<path stroke=\"#%02x%02x%02x\" fill=\"none\" d=\"M %d %d",
block->color->r,