Surface.colorKey - multiple declarations

Function Surface.colorKey

Wraps SDL_GetColorKey which gets the color key used by the dsdl.Surface for transparency

Color colorKey() @property @trusted const;

Returns

transparency color key in dsdl.Color

Throws

dsdl.SDLException if color key unable to be fetched

Function Surface.colorKey

Wraps SDL_SetColorKey which sets the color key used for the dsdl.Surface making pixels of the same color transparent

void colorKey (
  uint newPixelKey
) @property @trusted;

Parameters

NameDescription
newPixelKey pixel value of the color key that get transparency

Throws

dsdl.SDLException if color key unable to set

Function Surface.colorKey

Wraps SDL_SetColorKey which sets the color key used for the dsdl.Surface making pixels of the same color transparent

void colorKey (
  Color newColorKey
) @property @trusted;

Parameters

NameDescription
newColorKey dsdl.Color specifying pixels that get transparency

Throws

dsdl.SDLException if color key unable to set

Function Surface.colorKey

Acts as SDL_SetColorKey(surface, NULL) which disables color-keying

void colorKey (
  typeof(null) _
) @property @trusted;

Function Surface.colorKey

Wraps SDL_SetColorKey which sets or removes the color key used for the dsdl.Surface making pixels of the same color transparent

void colorKey (
  std.typecons.Nullable!(dsdl.pixels.Color) newColorKey
) @property @trusted;

Parameters

NameDescription
newColorKey dsdl.Color specifying pixels that get transparency; null to remove the color key

Throws

dsdl.SDLException if color key unable to set or removed