ttfGetTextPosition function
Get the position of a text object.
\param text the TTF_Text to query. \param x a pointer filled in with the x offset of the upper left corner of this text in pixels, may be NULL. \param y a pointer filled in with the y offset of the upper left corner of this text in pixels, may be NULL.
\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_SetTextPosition
extern SDL_DECLSPEC bool SDLCALL TTF_GetTextPosition(TTF_Text *text, int *x, int *y)
Implementation
bool ttfGetTextPosition(
Pointer<TtfText> text, Pointer<Int32> x, Pointer<Int32> y) {
final ttfGetTextPositionLookupFunction = libSdl3Ttf.lookupFunction<
Uint8 Function(Pointer<TtfText> text, Pointer<Int32> x, Pointer<Int32> y),
int Function(Pointer<TtfText> text, Pointer<Int32> x,
Pointer<Int32> y)>('TTF_GetTextPosition');
return ttfGetTextPositionLookupFunction(text, x, y) == 1;
}