summaryrefslogtreecommitdiff
path: root/lib/svg/path.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2019-04-10 00:10:51 -0400
committerGitHub <noreply@github.com>2019-04-10 00:10:51 -0400
commit08e8a885ea4db0837660232198881bd8d6654add (patch)
treed7344e7bb1344848d2c60735dc97078a5d95bb71 /lib/svg/path.py
parentd87750b8b01ec8aba52ed653ab151930d5d84a9f (diff)
parent2c39fbc8cf0ec626c945cbc4bd631c3372431821 (diff)
Merge pull request #409 from inkstitch/lexelby/revamp-fill
revamp auto-fill algorithm
Diffstat (limited to 'lib/svg/path.py')
-rw-r--r--lib/svg/path.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/svg/path.py b/lib/svg/path.py
index d2b4aee1..f0f6708b 100644
--- a/lib/svg/path.py
+++ b/lib/svg/path.py
@@ -1,3 +1,4 @@
+import cubicsuperpath
import inkex
import simpletransform
@@ -80,3 +81,11 @@ def point_lists_to_csp(point_lists):
csp.append(subpath)
return csp
+
+
+def line_strings_to_path(line_strings):
+ csp = line_strings_to_csp(line_strings)
+
+ return inkex.etree.Element("path", {
+ "d": cubicsuperpath.formatPath(csp)
+ })