unset svgwrite debug mode

Debug flag is set by default so that svgwrite do some validation stuff.
If you pass paths with many segments or generally a lot of paths svgwrite
takes a lot of time for validation. The paths that svgpathtools fed are
all of correct syntax and bad attributes are ignored by almost all programs
that handled with SVG. So, setting svgwrite debug to False is good choice.
pull/7/head
derVedro 2017-02-04 04:38:00 +01:00 committed by GitHub
parent 08e8dc71ff
commit 81ffe3f378
1 changed files with 2 additions and 2 deletions

View File

@ -276,9 +276,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) dwg = Drawing(filename=filename, debug=False, **svg_attributes)
else: else:
dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox) dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox, debug=False)
# add paths # add paths
if paths: if paths: