PixelFormat.this - multiple declarations
Function PixelFormat.this
Constructs a dsdl2
from a vanilla SDL_PixelFormat*
from bindbc-sdl
this
(
sdl .pixels .SDL_PixelFormat* sdlPixelFormat,
bool isOwner = true,
void* userRef = null
);
Parameters
Name | Description |
---|---|
sdlPixelFormat | the SDL_PixelFormat pointer to manage |
isOwner | whether the instance owns the given SDL_PixelFormat* and should destroy it on its own |
userRef | optional pointer to maintain reference link, avoiding GC cleanup |
Function PixelFormat.this
Constructs a dsdl2
using an SDL_PixelFormatEnum
from bindbc-sdl
this
(
uint sdlPixelFormatEnum
) @trusted;
Parameters
Name | Description |
---|---|
sdlPixelFormatEnum | the SDL_PixelFormatEnum enumeration (non-indexed) |
Throws
dsdl2
if allocation failed
Function PixelFormat.this
Constructs a dsdl2
using an indexed SDL_PixelFormatEnum
from bindbc-sdl, allowing use with
dsdl2
s
Parameters
Name | Description |
---|---|
sdlPixelFormatEnum | the SDL_PixelFormatEnum enumeration (indexed) |
palette | the dsdl2 class instance to bind as the color palette |
Throws
dsdl2
if allocation or palette-setting failed
Function PixelFormat.this
Constructs a dsdl2
from user-provided bit masks for RGB color and alpha channels by internally
using SDL_MasksToPixelFormatEnum
to retrieve the SDL_PixelFormatEnum
this
(
ubyte bitsPerPixel,
uint[4] rgbaMasks
) @trusted;
Parameters
Name | Description |
---|---|
bitsPerPixel | size of one pixel in bits |
rgbaMasks | bit masks for the red, green, blue, and alpha channels |
Throws
dsdl2
if pixel format conversion not possible