From b4e211fd797107177f07fe0e29eb1c09171f72cb Mon Sep 17 00:00:00 2001 From: Sumeet P Date: Wed, 14 Nov 2018 05:13:09 +0530 Subject: [PATCH] cx and cy to be 0 for circle/ellipse by default (#78) When cx and cy attributes are not defined either in ellipse or circle tag, consider both to be 0. --- svgpathtools/svg_to_paths.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svgpathtools/svg_to_paths.py b/svgpathtools/svg_to_paths.py index e922aaf..f9c3e79 100644 --- a/svgpathtools/svg_to_paths.py +++ b/svgpathtools/svg_to_paths.py @@ -24,8 +24,8 @@ def ellipse2pathd(ellipse): """converts the parameters from an ellipse or a circle to a string for a Path object d-attribute""" - cx = ellipse.get('cx', None) - cy = ellipse.get('cy', None) + cx = ellipse.get('cx', 0) + cy = ellipse.get('cy', 0) rx = ellipse.get('rx', None) ry = ellipse.get('ry', None) r = ellipse.get('r', None)