Skip to main content

draw_rect()

Description#

Draws a rectangle on the screen.

Syntax#

draw_rect(x, y, width, height)
draw_rect(x, y, width, height, thickness=1, fill_in=False)

Parameters#

x: the top left corner x coordinate
y: the top left corner y coordinate
width: width of rectangle
height: height of rectangle
thickness: thickness of rectangle border, default to 1
fill_in: Boolean that selects if the shape will be filled in. Default to False.

Returns#

None

Example Code#
Python#
#Python code
from zumi.util.screen import Screen
import time
screen=Screen()
screen.draw_rect(0,0,128,64,thickness=1,fill_in=True)