From 28eb374bd08f2230c57f6de821c3c8b83b40c0ff Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Tue, 7 Mar 2023 18:27:28 +0100 Subject: Add extension stroke to lpe satin (#2115) --- lib/elements/stroke.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/elements/stroke.py') diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py index 8f50690c..9fe6fee1 100644 --- a/lib/elements/stroke.py +++ b/lib/elements/stroke.py @@ -73,6 +73,14 @@ class Stroke(EmbroideryElement): def dashed(self): return self.get_style("stroke-dasharray") is not None + def update_dash(self, to_dash): + if self.dashed == to_dash: + return + if to_dash is False: + del self.node.style['stroke-dasharray'] + else: + self.node.style['stroke-dasharray'] = "1,0.5" + @property @param('stroke_method', _('Method'), @@ -87,7 +95,8 @@ class Stroke(EmbroideryElement): @property @param('manual_stitch', _('Manual stitch placement'), - tooltip=_("Stitch every node in the path. All options other than stop and trim are ignored. Lock stitches will be added only if force lock stitches is checked."), + tooltip=_("Stitch every node in the path. All options other than stop and trim are ignored. " + "Lock stitches will be added only if force lock stitches is checked."), type='boolean', default=False, select_items=[('stroke_method', 0)], -- cgit v1.2.3