1getr8(3) Allegro manual getr8(3)
2
3
4
6 getr8, getg8, getb8, getr15, getg15, getb15, getr16, getg16, getb16,
7 getr24, getg24, getb24, getr32, getg32, getb32 - Extract a color compo‐
8 nent from the specified pixel format. Allegro game programming library.
9
11 #include <allegro.h>
12
13
14 int getr8(int c);
15
16 int getg8(int c);
17
18 int getb8(int c);
19
20 int getr15(int c);
21
22 int getg15(int c);
23
24 int getb15(int c);
25
26 int getr16(int c);
27
28 int getg16(int c);
29
30 int getb16(int c);
31
32 int getr24(int c);
33
34 int getg24(int c);
35
36 int getb24(int c);
37
38 int getr32(int c);
39
40 int getg32(int c);
41
42 int getb32(int c);
43
45 Given a color in a display dependent format, these functions extract
46 one of the red, green, or blue components (ranging 0-255). Example:
47
48 int r, g, b, color_value;
49
50 color_value = _getpixel15(screen, 100, 100);
51 r = getr15(color_value);
52 g = getg15(color_value);
53 b = getb15(color_value);
54
55
57 geta32(3), getr(3), getr_depth(3), makecol(3), set_color_depth(3)
58
59
60
61Allegro version 4.4.3 getr8(3)