summaryrefslogtreecommitdiff
path: root/lib/elements/fill_stitch.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-03-08 16:58:58 +0100
committerGitHub <noreply@github.com>2025-03-08 16:58:58 +0100
commitc2aeb39a4413dd8bc6c14c832ab506c8c335faba (patch)
tree662479fbee78f882aa039b6b22fbd305e9d5dd89 /lib/elements/fill_stitch.py
parentba555c7ea300b77ca870f20648455c2d9c7a82d3 (diff)
use buffer(0) when fill rule is nonzero (#3561)
Diffstat (limited to 'lib/elements/fill_stitch.py')
-rw-r--r--lib/elements/fill_stitch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index 939d42d0..f8db39d5 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -772,7 +772,10 @@ class FillStitch(EmbroideryElement):
# biggest path.
paths = self.paths
paths.sort(key=lambda point_list: shgeo.Polygon(point_list).area, reverse=True)
- return shgeo.MultiPolygon([(paths[0], paths[1:])])
+ shape = shgeo.MultiPolygon([(paths[0], paths[1:])])
+ if self.node.style('fill-rule') == 'nonzero':
+ shape = shape.buffer(0)
+ return shape
@property
@cache