RectangleF constructor

init(self, x=0.0, y=0.0, width=0.0, height=0.0)

Creates a rectangle with the specified location and size.

def __init__(self, x=0.0, y=0.0, width=0.0, height=0.0):
    ...
ParameterTypeDescription
xfloatThe x-coordinate of the upper-left corner of the rectangle.
yfloatThe y-coordinate of the upper-left corner of the rectangle.
widthfloatThe width of the rectangle.
heightfloatThe height of the rectangle.

Exceptions

ExceptionDescription
TypeErrorA component is not a number.

See Also