Navit SVN

/work/compile/navit/src/navit/color.h

00001 
00020 #ifndef NAVIT_COLOR_H
00021 #define NAVIT_COLOR_H
00022 
00023 struct color {
00024         int r,g,b,a;
00025 };
00026 
00027 #define COLOR_WHITE_ 0xffff,0xffff,0xffff,0xffff
00028 #define COLOR_BLACK_ 0x0000,0x0000,0x0000,0xffff
00029 #define COLOR_BACKGROUND_ 0xffff, 0xefef, 0xb7b7, 0xffff
00030 #define COLOR_TRANSPARENT__ 0x0000,0x0000,0x0000,0xffff
00031 #define COLOR_WHITE ((struct color) {COLOR_WHITE_})
00032 #define COLOR_BLACK ((struct color) {COLOR_BLACK_})
00033 #define COLOR_TRANSPARENT ((struct color) {COLOR_TRANSPARENT_})
00034 #define COLOR_FMT "0x%x,0x%x,0x%x,0x%x"
00035 #define COLOR_ARGS(c) (c).r,(c).g,(c).b,(c).a
00036 
00037 #define COLOR_IS_SAME(c1,c2) ((c1).r==(c2).r && (c1).g==(c2).g && (c1).b==(c2).b && (c1).a==(c2).a)
00038 #define COLOR_IS_WHITE(c) COLOR_IS_SAME(c, COLOR_WHITE)
00039 #define COLOR_IS_BLACK(c) COLOR_IS_SAME(c, COLOR_BLACK)
00040 
00041 #endif