Color.this - multiple declarations
Function Color.this
Constructs a dsdl from a vanilla SDL_Color from bindbc-sdl
ref this
(
sdl .pixels .SDL_Color sdlColor
) @safe;
Parameters
| Name | Description |
|---|---|
| sdlColor | the SDL_Color struct |
Function Color.this
Constructs a dsdl 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
| Name | Description |
|---|---|
| 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 dsdl by feeding in an array of red, green, and blue, with alpha being 255
ref this
(
ubyte[3] rgb
) @safe;
Parameters
| Name | Description |
|---|---|
| rgb | array of red, green, blue values |
Function Color.this
Constructs a dsdl by feeding in an array of red, green, blue, and alpha
ref this
(
ubyte[4] rgba
) @safe;
Parameters
| Name | Description |
|---|---|
| rgba | array of red, green, blue, alpha values |