TESTER

text_wrap

text_wrap(text, x, y, width, [ax], [ay], [linespacing], [alignment], [stroke])

Draws text using the font previously loaded with load_text(), wrap at a certain distance

Syntaxe

text_wrap(text="Hello World", x=10, y=10, width=400, ax=MIDDLE, ay=END, linespacing=1.2, alignment=MIDDLE, stroke="#000000")

Arguments

NameRequiredDefaultDescription
textyes-Text to write
xyes-x-coordinate of the center
yyes-y-coordinate of the center
widthyes-Width before wrapping, in pixels
ax--Align position horizontaly (0-1) - You can use START, MIDDLE, END, or use text_align() for global consideration
ay--Align position verticaly (0-1) - You can use START, MIDDLE, END, or use text_align() for global consideration
linespacing--Specifies line spacing as a multiplier of the font size.
alignment--Specifies justification of text (START=left, MIDDLE=center or END=right).
stroke--Stroke color