diff options
| author | Lex Neva <github.com@lexneva.name> | 2021-08-07 10:58:02 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2021-08-07 10:58:02 -0400 |
| commit | 12ef0c84aa732623b210fdce1a7b8301aa435217 (patch) | |
| tree | 4c7fbb33c4840be4bf8d8fecfd7fe481d0e56895 /lib/extensions/convert_to_satin.py | |
| parent | c1e6558f7852def419adfbeb087b2194e6030a2c (diff) | |
| parent | d6e20fae8a03ac162ae0c863fff06b5bd8b77902 (diff) | |
Merge remote-tracking branch 'origin/main' into kaalleen/satin-patterns
Diffstat (limited to 'lib/extensions/convert_to_satin.py')
| -rw-r--r-- | lib/extensions/convert_to_satin.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/extensions/convert_to_satin.py b/lib/extensions/convert_to_satin.py index 393ffd9e..f3b43366 100644 --- a/lib/extensions/convert_to_satin.py +++ b/lib/extensions/convert_to_satin.py @@ -9,16 +9,15 @@ from itertools import chain, groupby import inkex import numpy -from lxml import etree from numpy import diff, setdiff1d, sign from shapely import geometry as shgeo +from .base import InkstitchExtension from ..elements import Stroke from ..i18n import _ from ..svg import PIXELS_PER_MM, get_correction_transform -from ..svg.tags import INKSTITCH_ATTRIBS, SVG_PATH_TAG +from ..svg.tags import INKSTITCH_ATTRIBS from ..utils import Point -from .base import InkstitchExtension class SelfIntersectionError(Exception): @@ -317,11 +316,10 @@ class ConvertToSatin(InkstitchExtension): d += "%s,%s " % (x, y) d += " " - return etree.Element(SVG_PATH_TAG, - { - "id": self.uniqueId("path"), - "style": path_style, - "transform": correction_transform, - "d": d, - INKSTITCH_ATTRIBS['satin_column']: "true", - }) + return inkex.PathElement(attrib={ + "id": self.uniqueId("path"), + "style": path_style, + "transform": correction_transform, + "d": d, + INKSTITCH_ATTRIBS['satin_column']: "true", + }) |
