Color.this - multiple declarations

Function Color.this

Constructs a dsdl2.Color from a vanilla SDL_Color from bindbc-sdl

ref this (
  sdl.pixels.SDL_Color sdlColor
) @safe;

Parameters

NameDescription
sdlColor the SDL_Color struct

Function Color.this

Constructs a dsdl2.Color by feeding in red, green, blue, and optionally alpha values

ref this (
  ubyte r,
  ubyte g,
  ubyte b,
  ubyte a = cast(ubyte)255u
) @safe;

Parameters

NameDescription
r red color channel value (0-255)
g green color channel value (0-255)
b blue color channel value (0-255)
a alpha transparency channel value (0-255 / transparent-opaque)

Function Color.this

Constructs a dsdl2.Color by feeding in an array of red, green, and blue, with alpha being 255

ref this (
  ubyte[3] rgb
) @safe;

Parameters

NameDescription
rgb array of red, green, blue values

Function Color.this

Constructs a dsdl2.Color by feeding in an array of red, green, blue, and alpha

ref this (
  ubyte[4] rgba
) @safe;

Parameters

NameDescription
rgba array of red, green, blue, alpha values