rect method

rect

Adds a rectangle to the current path.

def rect(self, x, y, width, height):
    ...
ParameterTypeDescription
xfloatThe x-coordinate of the top-left corner of the rectangle.
yfloatThe y-coordinate of the top-left corner of the rectangle.
widthfloatThe width of the rectangle.
heightfloatThe height of the rectangle.

See Also