text()

Typography / Loading & Displaying

Description

Draws text to the screen. With a bounding box (x, y, w, h), text wraps automatically.

Syntax

void text(std::string str, float x, float y) void text(std::string str, float x, float y, float w, float h)

Parameters

NameTypeDescription
strstd::stringthe string to display
xfloatx-coordinate
yfloaty-coordinate
wfloatwidth of text box (optional)
hfloatheight of text box (optional)

Returns

void

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...