1getr(3)                         Allegro manual                         getr(3)
2
3
4

NAME

6       getr,  getg,  getb,  geta  - Extract a color component from the current
7       pixel format. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int getr(int c);
14
15       int getg(int c);
16
17       int getb(int c);
18
19       int geta(int c);
20

DESCRIPTION

22       Given a color in the format being used by the current video mode, these
23       functions  extract  one  of  the  red, green, blue, or alpha components
24       (ranging 0-255), calling the preceding 8, 15, 16,  24,  or  32-bit  get
25       functions  as appropriate. The alpha part is only meaningful for 32-bit
26       pixels. Example:
27
28          int r, g, b, color_value;
29
30          color_value = getpixel(screen, 100, 100);
31          r = getr(color_value);
32          g = getg(color_value);
33          b = getb(color_value);
34
35

SEE ALSO

37       getr8(3), getr_depth(3), makecol(3), set_color_depth(3), exalpha(3)
38
39
40
41Allegro                          version 4.2.3                         getr(3)
Impressum