/[zanavi_public1]/navit/navit/color.h
ZANavi

Contents of /navit/navit/color.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (show annotations) (download)
Sat Dec 14 12:13:17 2013 UTC (10 years, 3 months ago) by zoff99
File MIME type: text/plain
File size: 1634 byte(s)
lots of fixes and changes, new world map
1 /**
2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef NAVIT_COLOR_H
21 #define NAVIT_COLOR_H
22
23 struct color
24 {
25 int r,g,b,a;
26 };
27
28
29 // for 0x000000[00] to 0xffffff[ff] (RRGGBB[AA])
30 struct shortcolor
31 {
32 unsigned int colorshort;
33 };
34
35 #define COLOR_WHITE_ 0xffff,0xffff,0xffff,0xffff
36 #define COLOR_BLACK_ 0x0000,0x0000,0x0000,0xffff
37 #define COLOR_BACKGROUND_ 0xffff, 0xefef, 0xb7b7, 0xffff
38 #define COLOR_TRANSPARENT__ 0x0000,0x0000,0x0000,0xffff
39 #define COLOR_WHITE ((struct color) {COLOR_WHITE_})
40 #define COLOR_BLACK ((struct color) {COLOR_BLACK_})
41 #define COLOR_TRANSPARENT ((struct color) {COLOR_TRANSPARENT_})
42 #define COLOR_FMT "0x%x,0x%x,0x%x,0x%x"
43 #define COLOR_ARGS(c) (c).r,(c).g,(c).b,(c).a
44
45 #define COLOR_IS_SAME(c1,c2) ((c1).r==(c2).r && (c1).g==(c2).g && (c1).b==(c2).b && (c1).a==(c2).a)
46 #define COLOR_IS_WHITE(c) COLOR_IS_SAME(c, COLOR_WHITE)
47 #define COLOR_IS_BLACK(c) COLOR_IS_SAME(c, COLOR_BLACK)
48
49 #endif

   
Visit the ZANavi Wiki