Merge pull request #18 from derVedro/patch-5

fixed ignored height and width arguments (specified using svg_attributes argument in disvg/wsvg)
pull/20/merge
Andy Port 2017-04-20 20:34:59 -07:00 committed by GitHub
commit 977914528c
1 changed files with 3 additions and 1 deletions

View File

@ -278,7 +278,9 @@ def disvg(paths=None, colors=None,
# Create an SVG file # Create an SVG file
if svg_attributes: if svg_attributes:
dwg = Drawing(filename=filename, **svg_attributes) szx = svg_attributes.get("width", szx)
szy = svg_attributes.get("height", szy)
dwg = Drawing(filename=filename, size=(szx, szy), **svg_attributes)
else: else:
dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox) dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox)