ttfSetTextPosition function ttf
Set the position of a text object.
This can be used to position multiple text objects within a single wrapping text area.
This function may cause the internal text representation to be rebuilt.
\param text the TTF_Text to modify. \param x the x offset of the upper left corner of this text in pixels. \param y the y offset of the upper left corner of this text in pixels. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety This function should be called on the thread that created the text.
\since This function is available since SDL_ttf 3.0.0.
\sa TTF_GetTextPosition
extern SDL_DECLSPEC bool SDLCALL TTF_SetTextPosition(TTF_Text *text, int x, int y)
Implementation
bool ttfSetTextPosition(Pointer<TtfText> text, int x, int y) {
final ttfSetTextPositionLookupFunction = _libTtf
.lookupFunction<
Uint8 Function(Pointer<TtfText> text, Int32 x, Int32 y),
int Function(Pointer<TtfText> text, int x, int y)
>('TTF_SetTextPosition');
return ttfSetTextPositionLookupFunction(text, x, y) == 1;
}