From 5a6b18bbf6b1413eadcb48db2ac72ab9b2d79c34 Mon Sep 17 00:00:00 2001 From: Mark Rages Date: Thu, 14 Feb 2019 22:56:42 -0700 Subject: [PATCH] Fix closepath per https://github.com/cjlano/svg/pull/12 --- svg2mod/svg/svg/svg.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/svg2mod/svg/svg/svg.py b/svg2mod/svg/svg/svg.py index 244fdaa..e5f3a58 100644 --- a/svg2mod/svg/svg/svg.py +++ b/svg2mod/svg/svg/svg.py @@ -258,10 +258,10 @@ class Group(Transformable): def __init__(self, elt=None): Transformable.__init__(self, elt) - + self.name = "" if elt is not None: - + for id, value in elt.attrib.iteritems(): id = self.parse_name( id ) @@ -401,7 +401,7 @@ def parse(self, pathstr): # Close Path l = Segment(current_pt, start_pt) self.items.append(l) - + current_pt = start_pt elif command in 'LHV': # LineTo, Horizontal & Vertical line @@ -708,4 +708,3 @@ def default(self, obj): tag = getattr(cls, 'tag', None) if tag: svgClass[svg_ns + tag] = cls -