From 368af49e2bd17fcf51abd41f66b387a3ad05fe71 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Fri, 25 Aug 2023 13:07:58 -0700 Subject: [PATCH] Was winding the tiny polygon holes backwards --- geometry.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index fb326455..54df8d68 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -255,11 +255,13 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double if (*accum_hole > pixel * pixel) { // XXX use centroid; + // winding is backward from above because this is a hole out.push_back(draw(VT_MOVETO, geom[i].x - pixel / 2, geom[i].y - pixel / 2)); - out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2 + pixel, geom[i].y - pixel / 2)); - out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2 + pixel, geom[i].y - pixel / 2 + pixel)); out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2, geom[i].y - pixel / 2 + pixel)); + out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2 + pixel, geom[i].y - pixel / 2 + pixel)); + out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2 + pixel, geom[i].y - pixel / 2)); out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2, geom[i].y - pixel / 2)); + includes_dust = true; *accum_hole -= pixel * pixel;