Scratch for Java

Canvas::drawText()

Browser availability: desktop-only.

This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.

A line of text whose first baseline starts at a point, in the default font.

Syntax

Java

.drawText(text, x, y, size, color)

Parameters

Name Data Type Description
text String the text
x double where it starts
y double its baseline
size double the font size
color Color the colour of the letters

Return

void

drawText()

Create Shareable URL

Select Sections