getColor method

SdlxColor? getColor()

Get the color of a text object.

\param text the TTF_Text to query. \param r a pointer filled in with the red color value in the range of 0-255, may be NULL. \param g a pointer filled in with the green color value in the range of 0-255, may be NULL. \param b a pointer filled in with the blue color value in the range of 0-255, may be NULL. \param a a pointer filled in with the alpha value in the range of 0-255, may be NULL. \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_GetTextColorFloat \sa TTF_SetTextColor

extern SDL_DECLSPEC bool SDLCALL TTF_GetTextColor(TTF_Text *text, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)

Implementation

SdlxColor? getColor() => ttfxGetTextColor(this);