Reference for draw_text
Draw text using the current font. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
draw_text
Transform
Purpose
Draw text using the current font and alignment.
Snippet
Draw "Hello World" in 12 point IBM Plex Mono at x coordinate 50 and y coordinate 100.
sketch.set_text_font('./IBMPlexMono-Regular.ttf', 12) sketch.draw_text(50, 100, 'Hello World')
Parameters
- x: The x coordinate at which to draw the text.
- y: The y coordinate at which to draw the text.
- text: The string to draw.
Examples
Availability
Available for all platforms.