Palette.this

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

  1. this(SDL_Palette* sdlPalette, bool isOwner, void* userRef)
    class Palette
    @system
    this
    (
    SDL_Palette* sdlPalette
    ,
    bool isOwner = true
    ,
    void* userRef = null
    )
  2. this(uint ncolors)
  3. this(Color[] colors)

Parameters

sdlPalette SDL_Palette*

the SDL_Palette pointer to manage

isOwner bool

whether the instance owns the given SDL_Palette* and should destroy it on its own

userRef void*

optional pointer to maintain reference link, avoiding GC cleanup

Meta