fixed support for rectangles when no x,y attributes are specified
defaults to 0,0pull/8/merge
parent
d670547149
commit
38eeac858c
|
@ -83,8 +83,8 @@ def rect2pathd(rect):
|
|||
|
||||
The rectangle will start at the (x,y) coordinate specified by the rectangle
|
||||
object and proceed counter-clockwise."""
|
||||
x0, y0 = rect['x'], rect['y']
|
||||
w, h = rect["width"], rect["height"]
|
||||
x0, y0 = float(rect.get('x', 0)), float(rect.get('y', 0))
|
||||
w, h = float(rect["width"]), float(rect["height"])
|
||||
x1, y1 = x0 + w, y0
|
||||
x2, y2 = x0 + w, y0 + h
|
||||
x3, y3 = x0, y0 + h
|
||||
|
|
Loading…
Reference in New Issue