rect method

rect

Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.

def rect(self, x, y, w, h):
    ...
ParameterTypeDescription
xfloatThe x axis of the coordinate for the rectangle starting point.
yfloatThe y axis of the coordinate for the rectangle starting point.
wfloatThe rectangle’s width.
hfloatThe rectangle’s height.

See Also