summaryrefslogtreecommitdiff
path: root/lib/elements/polyline.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2020-05-16 23:01:00 +0200
committerGitHub <noreply@github.com>2020-05-16 23:01:00 +0200
commita308db7ae152626c84ade069e307864a7e7e6213 (patch)
tree3af8a13562021796743378d16a1e7cc725ac75e4 /lib/elements/polyline.py
parent4e950332419743dcbaf661fdda1f7c7970241d93 (diff)
support svg objects (#643)
Diffstat (limited to 'lib/elements/polyline.py')
-rw-r--r--lib/elements/polyline.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/elements/polyline.py b/lib/elements/polyline.py
index a9870172..2d008d35 100644
--- a/lib/elements/polyline.py
+++ b/lib/elements/polyline.py
@@ -3,12 +3,12 @@ from shapely import geometry as shgeo
from ..i18n import _
from ..utils import cache
from ..utils.geometry import Point
-from .element import EmbroideryElement, Patch
+from .element import EmbroideryElement, Patch, param
from .validation import ValidationWarning
class PolylineWarning(ValidationWarning):
- name = _("Object is a PolyLine")
+ name = _("Polyline Object")
description = _("This object is an SVG PolyLine. Ink/Stitch can work with this shape, "
"but you can't edit it in Inkscape. Convert it to a manual stitch path "
"to allow editing.")
@@ -32,6 +32,13 @@ class Polyline(EmbroideryElement):
# users use File -> Import to pull in existing designs they may have
# obtained, for example purchased fonts.
+ element_name = "Polyline"
+
+ @property
+ @param('polyline', _('Manual stitch along path'), type='toggle', inverse=True)
+ def satin_column(self):
+ return self.get_boolean_param("polyline")
+
@property
def points(self):
# example: "1,2 0,0 1.5,3 4,2"
@@ -70,7 +77,7 @@ class Polyline(EmbroideryElement):
def color(self):
# EmbroiderModder2 likes to use the `stroke` property directly instead
# of CSS.
- return self.get_style("stroke") or self.node.get("stroke")
+ return self.get_style("stroke", "#000000")
@property
def stitches(self):