Surface.colorKey - multiple declarations

Function Surface.colorKey

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

Color colorKey() @property @trusted const;

Returns

transparency color key in dsdl2.Color

Throws

dsdl2.SDLException if color key unable to be fetched

Function Surface.colorKey

Wraps SDL_SetColorKey which sets the color key used for the dsdl2.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

dsdl2.SDLException if color key unable to set

Function Surface.colorKey

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

void colorKey (
  Color newColorKey
) @property @trusted;

Parameters

NameDescription
newColorKey dsdl2.Color specifying pixels that get transparency

Throws

dsdl2.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 dsdl2.Surface making pixels of the same color transparent

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

Parameters

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

Throws

dsdl2.SDLException if color key unable to set or removed