knockdown: square is a rect (#3747)

pull/3770/head dev-build-kaalleen-knockdown-shape-offset-rename
Kaalleen 2025-05-23 09:54:59 +02:00 zatwierdzone przez GitHub
rodzic 87f7e6124b
commit d8043e0a53
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -106,11 +106,11 @@ class KnockdownFill(InkstitchExtension):
for interior in polygon.interiors:
d += str(Path(interior.coords))
if self.options.shape == 'square':
square = polygon.envelope
offset_square = self._apply_offset(square, self.options.shape_offset, self.options.shape_join_style)
offset_square = offset_square.reverse()
d = str(Path(offset_square.exterior.coords)) + d
if self.options.shape == 'rect':
rect = polygon.envelope
offset_rect = self._apply_offset(rect, self.options.shape_offset, self.options.shape_join_style)
offset_rect = offset_rect.reverse()
d = str(Path(offset_rect.exterior.coords)) + d
elif self.options.shape == 'circle':
circle = minimum_bounding_circle(polygon)
offset_circle = self._apply_offset(circle, self.options.shape_offset, self.options.shape_join_style)

Wyświetl plik

@ -30,7 +30,7 @@
<page name="embossing" gui-text="Embossing">
<param name="shape" type="optiongroup" appearance="combo" gui-text="Shape">
<option value="">None</option>
<option value="square">Square</option>
<option value="rect">Rectangle</option>
<option value="circle">Circle</option>
</param>
<param name="shape-offset" type="float" gui-text="Shape offset" min="0" max="50">1</param>