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.
pull/79/head^2
Sumeet P 2018-11-14 05:13:09 +05:30 committed by Andy Port
parent 58d48029ac
commit b4e211fd79
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ def ellipse2pathd(ellipse):
"""converts the parameters from an ellipse or a circle to a string for a """converts the parameters from an ellipse or a circle to a string for a
Path object d-attribute""" Path object d-attribute"""
cx = ellipse.get('cx', None) cx = ellipse.get('cx', 0)
cy = ellipse.get('cy', None) cy = ellipse.get('cy', 0)
rx = ellipse.get('rx', None) rx = ellipse.get('rx', None)
ry = ellipse.get('ry', None) ry = ellipse.get('ry', None)
r = ellipse.get('r', None) r = ellipse.get('r', None)