diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2020-05-30 20:04:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 20:04:18 +0200 |
| commit | 67482fdfe02c8f3f6373b752a8c8092253737b8b (patch) | |
| tree | b8a30a0a7ac054e33a4e0e7ea4535d4b02c8c00b /lib/elements | |
| parent | 455b02847f14983ef8c2463849981f5e9fc44063 (diff) | |
fix non rounded rect path (#727)
Diffstat (limited to 'lib/elements')
| -rw-r--r-- | lib/elements/svg_objects.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/elements/svg_objects.py b/lib/elements/svg_objects.py index e597f7c1..4760af5f 100644 --- a/lib/elements/svg_objects.py +++ b/lib/elements/svg_objects.py @@ -3,14 +3,14 @@ def rect_to_path(node): y = float(node.get('y', '0')) width = float(node.get('width', '0')) height = float(node.get('height', '0')) - rx = None - ry = None + rx = 0 + ry = 0 # rounded corners # the following rules apply for radius calculations: - # if rx or ry is missing it has to take the value of the other one - # the radius cannot be bigger than half of the corresponding side - # (otherwise we receive an invalid path) + # * if rx or ry is missing it has to take the value of the other one + # * the radius cannot be bigger than half of the corresponding side + # (otherwise we receive an invalid path) if node.get('rx') or node.get('ry'): if node.get('rx'): rx = float(node.get('rx', '0')) |
