From 19950150210e5a3d7a76881b96e9b8b49e663309 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 28 Mar 2019 15:52:37 -0400 Subject: add SVG debugging with LineStrings --- lib/svg/path.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/svg/path.py') 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) + }) -- cgit v1.2.3