ttfxSetTextPosition function ttf

bool ttfxSetTextPosition(
  1. Pointer<TtfText> text,
  2. SdlxPoint position
)

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 ttfxSetTextPosition(Pointer<TtfText> text, SdlxPoint position) =>
    ttfSetTextPosition(text, position.x, position.y);