DarkBASIC Professional Help File

DX11:PIXELMAP

A pixel map provides efficient RAM storage of a 32-bit BGRA image. It essentially works like an image memblock and also provides functionality for copying / pasting sub-areas of
pixel maps. Images can be converted to pixel maps and pixel maps back to images; their prime purpose is to create images from scratch or to change an image on the CPU side.

    DX11 CREATE PIXELMAP : Return Dword = DX11 CREATE PIXELMAP(width, height, [fillColour])

    DX11 CREATE PIXELMAP FROM MEMORY : Return Dword = DX11 CREATE PIXELMAP FROM MEMORY(width, height, ptrSource)

    DX11 LOAD PIXELMAP : Return Dword = DX11 LOAD PIXELMAP(filename)

    DX11 DELETE PIXELMAP : DX11 DELETE PIXELMAP pixelMap

    DX11 PIXELMAP EXISTS : Return Boolean = DX11 PIXELMAP EXISTS(pixelMap)

    DX11 GET PIXELMAP WIDTH : Return Dword = DX11 GET PIXELMAP WIDTH(pixelMap)

    DX11 GET PIXELMAP HEIGHT : Return Dword = DX11 GET PIXELMAP HEIGHT(pixelMap)

    DX11 GET PIXELMAP BUFFER : Return Dword = DX11 GET PIXELMAP BUFFER(pixelMap)

    DX11 SET PIXELMAP PIXEL : DX11 SET PIXELMAP PIXEL pixelMap, x, y, colour

    DX11 GET PIXELMAP PIXEL : Return Dword = DX11 GET PIXELMAP PIXEL(pixelMap, x, y)

    DX11 GET PIXELMAP RECT : Return Dword = DX11 GET PIXELMAP RECT(pixelMap, x, y, width, height)

    DX11 SET PIXELMAP RECT : DX11 SET PIXELMAP RECT targetMap, sourceMap, x, y, [blendColour], [blendOnlyWhite], [epsilon]

    DX11 TRIM PIXELMAP : DX11 TRIM PIXELMAP pixelMap, [borderSize], [trimX], [trimY]