ratp: Avoid using rounded_rectangle when not exists
This commit is contained in:
parent
35be3033a8
commit
0768b1f078
@ -154,7 +154,7 @@ class IDFMAPI:
|
||||
draw.rectangle((0, 0, width, size), fill=fill)
|
||||
draw.rectangle((0, 0, width, 1), fill=fill if fill != "black" else "gray")
|
||||
draw.rectangle((0, size-2, width, size), fill=fill if fill != "black" else "gray")
|
||||
elif mode == "R" or mode == "rers":
|
||||
elif (mode == "R" or mode == "rers") and "rounded_rectangle" in draw.__dict__:
|
||||
draw.rounded_rectangle((0, 0, width, size), radius=4, fill=fill)
|
||||
else:
|
||||
draw.rectangle((0, 0, width, size), fill=fill)
|
||||
|
Loading…
Reference in New Issue
Block a user