From 70ad96a40e2746c00a8603795b882c58a824758d Mon Sep 17 00:00:00 2001 From: Juan Contreras Franco Date: Wed, 15 Mar 2017 09:26:14 +0100 Subject: [PATCH] polyline2pathd was already adding the z command. Hence, adding the z twice caused closed shapes to be considered open shapes. Change-Id: I36977ca9dc9611ffad2309e485fbd72e44fe3ff6 --- svgpathtools/svg2paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svgpathtools/svg2paths.py b/svgpathtools/svg2paths.py index f1ecbea..e1bf071 100644 --- a/svgpathtools/svg2paths.py +++ b/svgpathtools/svg2paths.py @@ -87,7 +87,7 @@ def svg2paths(svg_file_location, # path strings, add to list if convert_polygons_to_paths: pgons = [dom2dict(el) for el in doc.getElementsByTagName('polygon')] - d_strings += [polyline2pathd(pg['points']) + 'z' for pg in pgons] + d_strings += [polyline2pathd(pg['points']) for pg in pgons] attribute_dictionary_list += pgons if convert_lines_to_paths: