Skip to main content

draw_square()

Description#

Draws a square on the screen.

Syntax#

draw_square(x, y, width)
draw_square(x, y, width, thickness=1, fill_in=False)

Parameters#

x: the top left corner x coordinate
y: the top left corner y coordinate
width: width of each side
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_square(0,0,30,thickness=1,fill_in=True)