summaryrefslogtreecommitdiff
path: root/lib/elements/stroke.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2021-08-16 19:40:44 -0400
committerGitHub <noreply@github.com>2021-08-16 19:40:44 -0400
commit3ebc238561dd2403b19a56a0f3147c70eb4ebe3d (patch)
treec7e4c618335fac2196d42e03f26c3c2ad2a4251d /lib/elements/stroke.py
parent5a7b7276759b6fb4c85891b13d9ee7a2da8150ab (diff)
parentb49f7d28314f30727f9f963bddb795b88a95f2bd (diff)
Merge pull request #1254 from inkstitch/kaalleen/satin-patterns
Satin pattern and split stitch
Diffstat (limited to 'lib/elements/stroke.py')
-rw-r--r--lib/elements/stroke.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py
index 39a8f6e3..763167ad 100644
--- a/lib/elements/stroke.py
+++ b/lib/elements/stroke.py
@@ -7,11 +7,12 @@ import sys
import shapely.geometry
+from .element import EmbroideryElement, param
from ..i18n import _
+from ..stitch_plan import StitchGroup
from ..stitches import bean_stitch, running_stitch
from ..svg import parse_length_with_units
from ..utils import Point, cache
-from .element import EmbroideryElement, Patch, param
warned_about_legacy_running_stitch = False
@@ -190,15 +191,15 @@ class Stroke(EmbroideryElement):
stitches = running_stitch(repeated_path, stitch_length)
- return Patch(self.color, stitches)
+ return StitchGroup(self.color, stitches)
- def to_patches(self, last_patch):
+ def to_stitch_groups(self, last_patch):
patches = []
for path in self.paths:
path = [Point(x, y) for x, y in path]
if self.manual_stitch_mode:
- patch = Patch(color=self.color, stitches=path, stitch_as_is=True)
+ patch = StitchGroup(color=self.color, stitches=path, stitch_as_is=True)
elif self.is_running_stitch():
patch = self.running_stitch(path, self.running_stitch_length)