simplify svgs even more
This commit is contained in:
parent
0d1a45b565
commit
7d0c0f3288
1 changed files with 4 additions and 2 deletions
|
@ -63,8 +63,10 @@ class SVGImage:
|
|||
})
|
||||
if buffer:
|
||||
root.attrib['viewBox'] = ' '.join((offset_px, offset_px, width_px, height_px))
|
||||
root.append(self.defs)
|
||||
root.append(self.g)
|
||||
if len(self.defs):
|
||||
root.append(self.defs)
|
||||
if len(self.g):
|
||||
root.append(self.g)
|
||||
return root
|
||||
|
||||
def get_xml(self, buffer=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue