logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

Description

       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.

Function Parameters

surface
              the SDL_Surface structure to query.

       key    a pointer filled in with the transparent pixel.

Name

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

Return Value

       for more information.

See Also

SDL_SetSurfaceColorKey(3), SDL_SurfaceHasColorKey(3)

Simple Directmedia Layer                           SDL 3.2.20                          SDL_GetSurfaceColorKey(3)

Synopsis

#include<SDL3/SDL_surface.h>boolSDL_GetSurfaceColorKey(SDL_Surface*surface,Uint32*key);

Thread Safety

       It is safe to call this function from any thread.

See Also