logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TTF_DrawRendererText - Draw text to an SDL renderer.

Availability

       This function is available since SDL_ttf 3.0.0.

Description

text must have been created using a TTF_TextEngine
        from

       TTF_CreateRendererTextEngine (), and will draw using the renderer passed to that function.

Function Parameters

text   the text to draw.

       x      the x coordinate in pixels, positive from the left edge towards the right.

       y      the y coordinate in pixels, positive from the top edge towards the bottom.

Header File

       Defined in SDL3_ttf/SDL_ttf.h

Name

       TTF_DrawRendererText - Draw text to an SDL renderer.

Return Value

       Returns true on success or false on failure; call SDL_GetError() for more information.

See Also

(3), TTF_CreateRendererTextEngine(3), (3), TTF_CreateText(3)

SDL_ttf                                           SDL_ttf 3.2.2                          TTF_DrawRendererText(3)

Synopsis

#include"SDL3_ttf/SDL_ttf.h"boolTTF_DrawRendererText(TTF_Text*text,floatx,floaty);

Thread Safety

       This function should be called on the thread that created the text.

See Also