text()

Displays text on canvas

Description

The text function draws a text on the canvas at the specified location. The object drawn on the canvas is a shape that has an internal region which can be colored with fill() and a boundary which can be colored by stroke().

text(sentence, x, y)

Examples

    text("Hello, Strive!", 15, 25)
    text('This\'s been\n running for' , 15, 50)
    
    fill(255)
    text(f'{round(millis()/1000)} seconds', 15, 85)

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!

We'd love to hear your Feedback/Comments here.

Last updated