SDL_SetRenderDrawColor

Set the color used for drawing operations.

Set the color for drawing or filling rectangles, lines, and points, and for SDL_RenderClear.

extern (C) nothrow @nogc extern
bool
SDL_SetRenderDrawColor
(,
ubyte r
,
ubyte g
,
ubyte b
,
ubyte a
)

Parameters

renderer SDL_Renderer*

The rendering context.

r ubyte

The red value used to draw on the rendering target.

g ubyte

The green value used to draw on the rendering target.

b ubyte

The blue value used to draw on the rendering target.

a ubyte

The alpha value used to draw on the rendering target; usually SDL_ALPHA_OPAQUE (255). Use SDL_SetRenderDrawBlendMode to specify how the alpha channel is used.

Return Value

Type: bool

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

Threadsafety: This function should only be called on the main thread.

See Also

Meta