ttfGetTextColorFloat 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, normally in the range of 0-1, may be NULL. \param g a pointer filled in with the green color value, normally in the range of 0-1, may be NULL. \param b a pointer filled in with the blue color value, normally in the range of 0-1, may be NULL. \param a a pointer filled in with the alpha value in the range of 0-1, 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_GetTextColor \sa TTF_SetTextColorFloat
extern SDL_DECLSPEC bool SDLCALL TTF_GetTextColorFloat(TTF_Text *text, float *r, float *g, float *b, float *a)
Implementation
bool ttfGetTextColorFloat(
Pointer<TtfText> text,
Pointer<Float> r,
Pointer<Float> g,
Pointer<Float> b,
Pointer<Float> a,
) {
final ttfGetTextColorFloatLookupFunction = _libTtf
.lookupFunction<
Uint8 Function(
Pointer<TtfText> text,
Pointer<Float> r,
Pointer<Float> g,
Pointer<Float> b,
Pointer<Float> a,
),
int Function(
Pointer<TtfText> text,
Pointer<Float> r,
Pointer<Float> g,
Pointer<Float> b,
Pointer<Float> a,
)
>('TTF_GetTextColorFloat');
return ttfGetTextColorFloatLookupFunction(text, r, g, b, a) == 1;
}