drawText()
Draw a line of text straight onto the display.
display.drawText(text, x, y)
Same as drawLabel().
Parameters
display.drawText(text, x, y, color=Color.BLACK, font=None)
| Parameter | Type | Default | Description |
|---|---|---|---|
text |
str |
required | The text to draw. |
x |
int or float |
required | The horizontal position of the top-left corner, in pixels. |
y |
int or float |
required | The vertical position of the top-left corner, in pixels. |
color |
Color |
Color.BLACK |
The text color. |
font |
Font |
None |
The font, for example Font("Serif", Font.ITALIC, 16). If omitted, the default font is used. |