Skip to main content

draw_text()

Description#

Draws text to the upper lefthand corner of the screen

Syntax#

draw_text(string)
draw_text(string, x, y, font_size) (display, clear)..

Parameters#

string   (type: string)
: The string that zumi will show on the screen
x    (type: integer, default: 1)
: The x coordinate start value of the string
y   
(type: integer, default: 1)
: The y coordinate start value of the string
font_size   (type: integer, default: 16)
: The font size of the string

Returns#

None

Example Code#
Python#
#Python code
from zumi.util.screen import Screen
import time
screen=Screen()
for i in range(10):
screen.draw_text(str(i)+'!')
time.sleep(0.1)
screen.clear_display()