Palette.this - multiple declarations

Function Palette.this

Constructs a dsdl2.Palette from a vanilla SDL_Palette* from bindbc-sdl

this (
  sdl.pixels.SDL_Palette* sdlPalette,
  bool isOwner = true,
  void* userRef = null
);

Parameters

NameDescription
sdlPalette the SDL_Palette pointer to manage
isOwner whether the instance owns the given SDL_Palette* and should destroy it on its own
userRef optional pointer to maintain reference link, avoiding GC cleanup

Function Palette.this

Constructs a dsdl2.Palette and allocate memory for a set amount of dsdl2.Colors

this (
  uint ncolors
) @trusted;

Parameters

NameDescription
ncolors amount of dsdl2.Colors to allocate in the dsdl2.Palette

Throws

dsdl2.SDLException if allocation failed

Function Palette.this

Constructs a dsdl2.Palette from an array of dsdl2.Colors

this (
  const(Color[]) colors
) @trusted;

Parameters

NameDescription
colors an array/slice of dsdl2.Colors to put in the dsdl2.Palette

Throws

dsdl2.SDLException if allocation failed