1SDL_GetRGBA(3) SDL API Reference SDL_GetRGBA(3)
2
3
4
6 SDL_GetRGBA - Get RGBA values from a pixel in the specified pixel for‐
7 mat.
8
10 #include "SDL.h"
11
12 void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8
13 *g, Uint8 *b, Uint8 *a);
14
16 Get RGBA component values from a pixel stored in the specified pixel
17 format.
18
19 This function uses the entire 8-bit [0..255] range when converting
20 color components from pixel formats with less than 8-bits per RGB com‐
21 ponent (e.g., a completely white pixel in 16-bit RGB565 format would
22 return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
23
24 If the surface has no alpha component, the alpha will be returned as
25 0xff (100% opaque).
26
28 SDL_GetRGB, SDL_MapRGB, SDL_MapRGBA, SDL_PixelFormat
29
30
31
32SDL Tue 11 Sep 2001, 23:01 SDL_GetRGBA(3)