getr8, getg8, getb8, getr15, getg15, getb15, getr16, getg16, getb16, getr24, getg24, getb24, getr32,
Contents
Description
Given a color in a display dependent format, these functions extract one of the red, green, or blue
components (ranging 0-255). Example:
int r, g, b, color_value;
color_value = _getpixel15(screen, 100, 100);
r = getr15(color_value);
g = getg15(color_value);
b = getb15(color_value);
Name
getr8, getg8, getb8, getr15, getg15, getb15, getr16, getg16, getb16, getr24, getg24, getb24, getr32,
getg32, getb32 - Extract a color component from the specified pixel format. Allegro game programming
library.
See Also
geta32(3alleg4), getr(3alleg4), getr_depth(3alleg4), makecol(3alleg4), set_color_depth(3alleg4) Allegro version 4.4.3 getr8(3alleg4)
Synopsis
#include<allegro.h>intgetr8(intc);intgetg8(intc);intgetb8(intc);intgetr15(intc);intgetg15(intc);intgetb15(intc);intgetr16(intc);intgetg16(intc);intgetb16(intc);intgetr24(intc);intgetg24(intc);intgetb24(intc);intgetr32(intc);intgetg32(intc);intgetb32(intc);
