]> Dogcows Code - chaz/homebank/blob - src/gtk-chart-colors.h
import homebank-4.6.3
[chaz/homebank] / src / gtk-chart-colors.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __GTK_COLORS_H__
21 #define __GTK_COLORS_H__
22
23 #include <cairo.h>
24
25 #define MASKCOL 255
26 #define COLTO16(col8) ( (col8 | col8<<8 ) )
27 #define COLTOOVER(col8) ( (col8 + MASKCOL) / 2 )
28
29
30 #define OVER_ALPHA .15
31 #define OVER_COLOR (MASKCOL * OVER_ALPHA)
32 #define COLTOCAIRO(col8) ( (col8 / 255.0) )
33 #define COLTOCAIROOVER(col8) ( ((col8 * (1 - OVER_ALPHA)) + OVER_COLOR ) / 255.0 )
34
35 /* new stuff */
36 #define CHART_FONT_SIZE_NORMAL 10
37 #define CHART_FONT_SIZE_TITLE 18
38 #define CHART_FONT_SIZE_PERIOD 11
39
40
41 //typedef struct _rgbcol RgbCol;
42
43 struct rgbcol
44 {
45 guint8 r, g, b;
46 };
47
48
49
50 enum {
51 BLACK,
52 WHITE,
53 GREY1,
54 TEXT,
55 XYLINES,
56 THBASE,
57 THTEXT
58 };
59
60 enum colmap
61 {
62 CHART_COLMAP_HOMEBANK,
63 CHART_COLMAP_MSMONEY,
64 CHART_COLMAP_SAP,
65 CHART_COLMAP_QUICKEN,
66 CHART_COLMAP_OFFICE2010,
67 CHART_COLMAP_OFFICE2013,
68 CHART_COLMAP_ANALYTICS,
69 };
70
71 extern char *chart_colors[];
72
73 extern struct rgbcol global_colors[];
74 extern struct rgbcol money_colors[];
75 extern struct rgbcol quicken_colors[];
76 extern struct rgbcol analytics_colors[];
77 extern struct rgbcol office2010_colors[];
78 extern struct rgbcol office2013_colors[];
79 extern struct rgbcol sap_colors[];
80 extern struct rgbcol homebank_colors[];
81
82 extern int money_nbcolors;
83 extern int quicken_nbcolors;
84 extern int analytics_nbcolors;
85 extern int office2010_nbcolors;
86 extern int office2013_nbcolors;
87 extern int sap_nbcolors;
88 extern int homebank_nbcolors;
89
90 void cairo_user_set_rgbcol(cairo_t *cr, struct rgbcol *col);
91 void cairo_user_set_rgbacol(cairo_t *cr, struct rgbcol *col, double alpha);
92 void cairo_user_set_rgbcol_over(cairo_t *cr, struct rgbcol *col, gboolean over);
93
94 #endif /* __GTK_COLORS_H__ */
This page took 0.032257 seconds and 4 git commands to generate.