Penguin
Blame: SDL_MapRGB(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_MapRGB(3) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SDL_MapRGB
2 !!!SDL_MapRGB
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 SEE ALSO
8 ----
9 !!NAME
10
11
12 SDL_MapRGB- Map a RGB color value to a pixel format.
13 !!SYNOPSIS
14
15
16 __#include __
17
18
2 perry 19 __Uint32 SDL_MapRGB__(__SDL_!PixelFormat *fmt, Uint8 r,
1 perry 20 Uint8 g, Uint8 b__);
21 !!DESCRIPTION
22
23
24 Maps the RGB 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 an alpha component it will
33 be returned as all 1 bits (fully opaque).
34 !!RETURN VALUE
35
36
37 A pixel value best approximating the given RGB color value
38 for a given pixel format. If the pixel format bpp (color
39 depth) is less than 32-bpp then the unused upper bits of the
40 return value can safely be ignored (e.g., with a 16-bpp
41 format the return value can be assigned to a __Uint16__,
42 and similarly a __Uint8__ for an 8-bpp
43 format).
44 !!SEE ALSO
45
46
47 __SDL_GetRGB__, __SDL_GetRGBA__, __SDL_MapRGBA__,
2 perry 48 __SDL_!PixelFormat__
1 perry 49 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.