Fix default matrix used when parsing svg path without transform attribute

This commit is contained in:
Florian Festi 2016-06-22 23:10:26 +02:00
parent 1c0ec91fe1
commit 3d60aa096b
1 changed files with 3 additions and 2 deletions

View File

@ -34,8 +34,9 @@ class SVGFile(object):
if m: if m:
matrix = [float(m.group(i)) for i in range(1, 12, 2)] matrix = [float(m.group(i)) for i in range(1, 12, 2)]
else: else:
matrix = [1,0,0, matrix = [1, 0,
0,1,0] 0, 1,
0, 0]
for m in self.pathre.findall(attrs.get("d", "")): for m in self.pathre.findall(attrs.get("d", "")):
x = float(m[1]) x = float(m[1])
y = float(m[3]) y = float(m[3])