PixelFormat.getRGB

Wraps SDL_GetRGB which converts a pixel uint value to a comprehensible dsdl2.Color struct without accounting the alpha value (automatically set to opaque [255]), based on the pixel format defined by the dsdl2.PixelFormat

class PixelFormat
const @trusted
getRGB
(
uint pixel
)

Parameters

pixel uint

the pixel uint value to convert

Return Value

Type: Color

the dsdl2.Color struct of the given pixel value

Meta