Man page - sdl_getsurfacecolorkey(3)

Packages contas this manual

Manual

SDL_GetSurfaceColorKey(3) SDL3 FUNCTIONS SDL_GetSurfaceColorKey(3)

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

Defined in SDL3/SDL_surface.h

#include "SDL3/SDL.h"
bool SDL_GetSurfaceColorKey(SDL_Surface *surface, Uint32 *key);

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 false.

the SDL_Surface
structure to query.
a pointer filled in with the transparent pixel.

Returns true on success or false on failure; call

SDL_GetError () for more information.

It is safe to call this function from any thread.

This function is available since SDL 3.2.0.

(3), SDL_SetSurfaceColorKey(3), (3), SDL_SurfaceHasColorKey(3)

SDL 3.2.10 Simple Directmedia Layer