Function sdl2_sys::SDL_GetRGB
source ยท pub unsafe extern "C" fn SDL_GetRGB(
pixel: Uint32,
format: *const SDL_PixelFormat,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
)
Expand description
Get RGB values from a pixel in the specified format.
This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
\param pixel a pixel value \param format an SDL_PixelFormat structure describing the format of the pixel \param r a pointer filled in with the red component \param g a pointer filled in with the green component \param b a pointer filled in with the blue component
\since This function is available since SDL 2.0.0.
\sa SDL_GetRGBA \sa SDL_MapRGB \sa SDL_MapRGBA