Surface.this - multiple declarations
Function Surface.this
Constructs a dsdl
from a vanilla SDL_Surface*
from bindbc-sdl
this
(
sdl .surface .SDL_Surface* sdlSurface,
bool isOwner = true,
void* userRef = null
);
Parameters
Name | Description |
---|---|
sdlSurface | the SDL_Surface pointer to manage |
isOwner | whether the instance owns the given SDL_Surface* and should destroy it on its own |
userRef | optional pointer to maintain reference link, avoiding GC cleanup |
Function Surface.this
Constructs a blank RGB(A) dsdl
with a set width, height, and dsdl
that wraps
SDL_CreateRGBSurface
Parameters
Name | Description |
---|---|
size | size (width and height) of the dsdl in pixels |
rgbPixelFormat | an RGB(A) dsdl |
Throws
dsdl
if allocation failed
Function Surface.this
Constructs an RGB(A) dsdl
from an array of pixels
this
(
const(void[]) pixels,
uint[2] size,
ulong pitch,
const(PixelFormat) rgbPixelFormat
) @trusted;
Parameters
Name | Description |
---|---|
pixels | array of pixel data (copied internally) |
size | size (width and height) of the dsdl in pixels |
pitch | skips in bytes per line/row of the dsdl |
rgbPixelFormat | an RGB(A) dsdl |
Throws
dsdl
if allocation failed
Function Surface.this
Constructs a blank indexed palette-using dsdl
with a set width, height, and index bit depth,
which wraps SDL_CreateRGBSurface
Parameters
Name | Description |
---|---|
size | size (width and height) of the dsdl in pixels |
bitDepth | bit depth of the palette index (1, 4, or 8) |
palette | dsdl to use |
Throws
dsdl
if allocation failed or palette-setting failed
Function Surface.this
Constructs a blank indexed palette-using dsdl
from an array of pixels
Parameters
Name | Description |
---|---|
pixels | array of pixel data (copied internally) |
size | size (width and height) of the dsdl in pixels |
pitch | skips in bytes per line/row of the dsdl |
bitDepth | bit depth of the palette index (1, 4, or 8) |
palette | dsdl to use |
Throws
dsdl
if allocation failed or palette-setting failed