1 /* color.h: declarations for color handling. */ 2 3 #ifndef COLOR_H 4 #define COLOR_H 5 6 #include "autotrace.h" 7 #include "bitmap.h" 8 9 typedef at_color_type color_type; 10 11 /* RGB to grayscale */ 12 #define COLOR_LUMINANCE(c) ((unsigned char)(((c).r) * 0.30 + ((c).g) * 0.59 + ((c).b) * 0.11 + 0.5)) 13 14 #define COLOR_EQUAL(c1,c2) (((c1).r == (c2).r) && ((c1).g == (c2).g) && ((c1).b == (c2).b)) 15 16 color_type GET_COLOR (at_bitmap_type, unsigned int, unsigned int); 17 18 #endif /* not COLOR_H */ 19