SDL_WriteSurfacePixelFloat

Writes a single pixel to a surface.

This function prioritizes correctness over speed: it is suitable for unit tests, but is not intended for use in a game engine.

extern (C) nothrow @nogc extern
bool
SDL_WriteSurfacePixelFloat
(,
int x
,
int y
,
float r
,
float g
,
float b
,
float a
)

Parameters

surface SDL_Surface*

the surface to write.

x int

the horizontal coordinate, 0 <= x < width.

y int

the vertical coordinate, 0 <= y < height.

r float

the red channel value, normally in the range 0-1.

g float

the green channel value, normally in the range 0-1.

b float

the blue channel value, normally in the range 0-1.

a float

the alpha channel value, normally in the range 0-1.

Return Value

Type: bool

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

Meta