SDL2Surface.setColorKey

Enable the (r, g, b, a) key color as the transparent key.

  1. void setColorKey(bool enable, uint key)
  2. void setColorKey(bool enable, ubyte r, ubyte g, ubyte b, ubyte a)
    class SDL2Surface
    void
    setColorKey
    (
    bool enable
    ,
    ubyte r
    ,
    ubyte g
    ,
    ubyte b
    ,
    ubyte a = 0
    )

Throws

SDL2Exception on error.

See Also

https://wiki.libsdl.org/SDL_SetColorKey $(https://wiki.libsdl.org/SDL_MapRGBA)

Meta