1SDL_GetRGB(3)                  SDL API Reference                 SDL_GetRGB(3)
2
3
4

NAME

6       SDL_GetRGB - Get RGB values from a pixel in the specified pixel format.
7

SYNOPSIS

9       #include "SDL.h"
10
11       void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g,
12       Uint8 *b);
13

DESCRIPTION

15       Get RGB component values from a pixel stored  in  the  specified  pixel
16       format.
17
18       This  function  uses  the  entire  8-bit [0..255] range when converting
19       color components from pixel formats with less than 8-bits per RGB  com‐
20       ponent  (e.g.,  a  completely white pixel in 16-bit RGB565 format would
21       return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
22

SEE ALSO

24       SDL_GetRGBA, SDL_MapRGB, SDL_MapRGBA, SDL_PixelFormat
25
26
27
28SDL                         Tue 11 Sep 2001, 23:01               SDL_GetRGB(3)
Impressum