dostunnel
view src/colorbit.h @ 1:5d7f784002b0
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 15 Mar 2013 16:49:32 +0200 |
parents | |
children |
line source
1 #ifndef COLORBIT_H_
2 #define COLORBIT_H_
4 #define RSHIFT 0
5 #define GSHIFT 8
6 #define BSHIFT 16
8 #define PACK_COLOR24(r, g, b) \
9 ((((r) & 0xff) << RSHIFT) | \
10 (((g) & 0xff) << GSHIFT) | \
11 (((b) & 0xff) << BSHIFT))
13 #define UNP_RED32(x) (((x) >> RSHIFT) & 0xff)
14 #define UNP_GREEN32(x) (((x) >> GSHIFT) & 0xff)
15 #define UNP_BLUE32(x) (((x) >> BSHIFT) & 0xff)
17 #endif /* COLORBIT_H_ */