Function sdl2_sys::SDL_GetColorKey

source ·
pub unsafe extern "C" fn SDL_GetColorKey(
    surface: *mut SDL_Surface,
    key: *mut Uint32
) -> c_int
Expand description

Get the color key (transparent pixel) for a surface.

The color key is a pixel of the format used by the surface, as generated by SDL_MapRGB().

If the surface doesn’t have color key enabled this function returns -1.

\param surface the SDL_Surface structure to query \param key a pointer filled in with the transparent pixel \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_BlitSurface \sa SDL_SetColorKey