ttfGetTextColor function ttf
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
bool ttfGetTextColor(
Pointer<TtfText> text,
Pointer<Uint8> r,
Pointer<Uint8> g,
Pointer<Uint8> b,
Pointer<Uint8> a,
) {
final ttfGetTextColorLookupFunction = _libTtf
.lookupFunction<
Uint8 Function(
Pointer<TtfText> text,
Pointer<Uint8> r,
Pointer<Uint8> g,
Pointer<Uint8> b,
Pointer<Uint8> a,
),
int Function(
Pointer<TtfText> text,
Pointer<Uint8> r,
Pointer<Uint8> g,
Pointer<Uint8> b,
Pointer<Uint8> a,
)
>('TTF_GetTextColor');
return ttfGetTextColorLookupFunction(text, r, g, b, a) == 1;
}