fix non rounded rect path (#727)

pull/732/head
Kaalleen 2020-05-30 20:04:18 +02:00 zatwierdzone przez GitHub
rodzic 455b02847f
commit 67482fdfe0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -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'))