setPosition method

bool setPosition(
  1. 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 setPosition(SdlxPoint position) => ttfxSetTextPosition(this, position);