setWrapWidth method

bool setWrapWidth(
  1. int wrapWidth
)

Set whether wrapping is enabled on a text object.

This function may cause the internal text representation to be rebuilt.

\param text the TTF_Text to modify. \param wrap_width the maximum width in pixels, 0 to wrap on newline characters. \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_GetTextWrapWidth

extern SDL_DECLSPEC bool SDLCALL TTF_SetTextWrapWidth(TTF_Text *text, int wrap_width)

Implementation

bool setWrapWidth(int wrapWidth) => ttfSetTextWrapWidth(this, wrapWidth);