rectangle
draw.rectangle()
Draws a rectangle.
draw.rectangle([x, y, w, h], type, rotation)
[x, y, w, h]
Array
Defines position (x
, y
) and size (w
= width, h
= height) of the drawing on screen.
type
Number
Determines the drawing mode:
0
: Fill and outline1
: Fill only2
: Outline only
Rotation angle in degrees. Rotation is applied around the object's center.