Penguin
Blame: SDL_MapRGBA(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_MapRGBA(3) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SDL_MapRGBA
2 !!!SDL_MapRGBA
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 SEE ALSO
8 ----
9 !!NAME
10
11
12 SDL_MapRGBA- Map a RGBA color value to a pixel format.
13 !!SYNOPSIS
14
15
16 __#include __
17
18
2 perry 19 __Uint32 SDL_MapRGBA__(__SDL_!PixelFormat *fmt, Uint8 r,
1 perry 20 Uint8 g, Uint8 b, Uint8 a__);
21 !!DESCRIPTION
22
23
24 Maps the RGBA color value to the specified pixel format and
25 returns the pixel value as a 32-bit int.
26
27
28 If the format has a palette (8-bit) the index of the closest
29 matching color in the palette will be returned.
30
31
32 If the specified pixel format has no alpha component the
33 alpha value will be ignored (as it will be in formats with a
34 palette).
35 !!RETURN VALUE
36
37
38 A pixel value best approximating the given RGBA color value
39 for a given pixel format. If the pixel format bpp (color
40 depth) is less than 32-bpp then the unused upper bits of the
41 return value can safely be ignored (e.g., with a 16-bpp
42 format the return value can be assigned to a __Uint16__,
43 and similarly a __Uint8__ for an 8-bpp
44 format).
45 !!SEE ALSO
46
47
48 ''SDL_GetRGB'', ''SDL_GetRGBA'', ''SDL_MapRGB'',
2 perry 49 ''SDL_!PixelFormat''
1 perry 50 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.