Function PixelFormat.mapRGB

Wraps SDL_MapRGB which converts a dsdl2.Color to its pixel uint value according to the pixel format defined by the dsdl2.PixelFormat without accounting the alpha value, assuming that it's opaque

uint mapRGB (
  Color color
) @trusted const;

Parameters

NameDescription
color the dsdl2.Color struct to convert

Returns

the converted pixel value