textAlign()

Typography / Attributes

Description

Sets the alignment for drawing text. The first parameter can be LEFT, CENTER, or RIGHT. The second parameter (optional) can be TOP, BOTTOM, CENTER, or BASELINE.

Syntax

void textAlign(int alignX) void textAlign(int alignX, int alignY)

Parameters

NameTypeDescription
alignXintLEFT, CENTER, or RIGHT
alignYintTOP, BOTTOM, CENTER, or BASELINE (optional)

Returns

void

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...