navit 0.5.3-trunk
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1
20#ifndef NAVIT_COLOR_H
21#define NAVIT_COLOR_H
22
23struct color {
24 int r, g, b, a;
25};
26
27#define COLOR_BITDEPTH 16
28#define COLOR_WHITE_ 0xffff, 0xffff, 0xffff, 0xffff
29#define COLOR_BLACK_ 0x0000, 0x0000, 0x0000, 0xffff
30#define COLOR_BACKGROUND_ 0xffff, 0xefef, 0xb7b7, 0xffff
31#define COLOR_TRANSPARENT__ 0x0000, 0x0000, 0x0000, 0xffff
32#define COLOR_WHITE ((struct color){COLOR_WHITE_})
33#define COLOR_BLACK ((struct color){COLOR_BLACK_})
34#define COLOR_TRANSPARENT ((struct color){COLOR_TRANSPARENT_})
35#define COLOR_FMT "0x%x,0x%x,0x%x,0x%x"
36#define COLOR_ARGS(c) (c).r, (c).g, (c).b, (c).a
37/*default alpha value to apply for all things flagged AF_UNDERGROUND
38 *use solid color to not change default behaviour*/
39#define UNDERGROUND_ALPHA_ 0xFFFF
40
41#define COLOR_IS_SAME(c1, c2) ((c1).r == (c2).r && (c1).g == (c2).g && (c1).b == (c2).b && (c1).a == (c2).a)
42#define COLOR_IS_WHITE(c) COLOR_IS_SAME(c, COLOR_WHITE)
43#define COLOR_IS_BLACK(c) COLOR_IS_SAME(c, COLOR_BLACK)
44
45#endif
Definition color.h:23
int g
Definition color.h:24
int a
Definition color.h:24
int r
Definition color.h:24
int b
Definition color.h:24