Skip to main content

SDL_SetSurfaceColorspace

Function SDL_SetSurfaceColorspace 

Source
pub unsafe extern "C" fn SDL_SetSurfaceColorspace(
    surface: *mut SDL_Surface,
    colorspace: SDL_Colorspace,
) -> bool
Expand description

Set the colorspace used by a surface.

Setting the colorspace doesn’t change the pixels, only how they are interpreted in color operations.

§Parameters

§Return value

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

§Thread safety

This function can be called on different threads with different surfaces.

§Availability

This function is available since SDL 3.2.0.

§See also