setText

Syntax

void setText(int x, int y, int color, int flags, char* text)

Arguments

x
Horizontal offset from left edge in pixels.
y
Vertical offset from top edge in pixels.
color
Color value for the text.
flags
Any combination of TA_* and VTA_* flags. Available alignment constants are TA_BASELINE, TA_BOTTOM, TA_TOP, TA_CENTER, TA_LEFT, TA_RIGHT, TA_NOUPDATECP, TA_RTLREADING, TA_UPDATECP, VTA_BASELINE, VTA_CENTER
text
The text to render.

Description

Render text to an ownerdraw control.

Example

const int x = HDBUsToPixels(getCtlPos(n, 2));
const int y = VDBUsToPixels(getCtlPos(n, 1));
startSetPixel(3);
setText(x / 2, 0, COLOR(WHITE), VTA_CENTER | TA_BASELINE, getCtlText(n));
endSetPixel(3);

See Also

setFont, setTextv