Rectangle constructor
init(self, x=0, y=0, width=0, height=0)
Creates a rectangle with the specified location and size. Float values are truncated to integers.
def __init__(self, x=0, y=0, width=0, height=0):
...
| Parameter | Type | Description |
|---|
| x | int | The x-coordinate of the upper-left corner of the rectangle. |
| y | int | The y-coordinate of the upper-left corner of the rectangle. |
| width | int | The width of the rectangle. |
| height | int | The height of the rectangle. |
Exceptions
| Exception | Description |
|---|
| TypeError | A component is not a number. |
See Also