From 81ffe3f378b81ae9b33e648a96460322ba3559c8 Mon Sep 17 00:00:00 2001 From: derVedro Date: Sat, 4 Feb 2017 04:38:00 +0100 Subject: [PATCH] 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. --- svgpathtools/paths2svg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svgpathtools/paths2svg.py b/svgpathtools/paths2svg.py index a4ae48b..9bffc36 100644 --- a/svgpathtools/paths2svg.py +++ b/svgpathtools/paths2svg.py @@ -276,9 +276,9 @@ def disvg(paths=None, colors=None, # Create an SVG file if svg_attributes: - dwg = Drawing(filename=filename, **svg_attributes) + dwg = Drawing(filename=filename, debug=False, **svg_attributes) else: - dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox) + dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox, debug=False) # add paths if paths: