2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
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/>.
21
#ifndef __CAIRO_DOCK_GRAPH2__
22
#define __CAIRO_DOCK_GRAPH2__
27
#include <cairo-dock-struct.h>
28
#include <cairo-dock-data-renderer.h>
31
*@file cairo-dock-graph.h This class defines the Graph, which derives from the DataRenderer.
32
* All you need to know is the attributes that define a Graph, the API to use is the common API for DataRenderer, i ncairo-dock-data-renderer.h.
37
/// a continuous line.
38
CAIRO_DOCK_GRAPH2_LINE=0,
39
/// a continuous plain graph.
40
CAIRO_DOCK_GRAPH2_PLAIN,
42
CAIRO_DOCK_GRAPH2_BAR,
44
CAIRO_DOCK_GRAPH2_CIRCLE,
46
CAIRO_DOCK_GRAPH2_CIRCLE_PLAIN
49
typedef struct _CairoGraphAttribute CairoGraphAttribute;
50
/// Attributes of a Graph.
51
struct _CairoGraphAttribute {
52
/// General attributes of any DataRenderer.
53
CairoDataRendererAttribute rendererAttribute;
55
CairoDockTypeGraph iType;
56
/// color of the high values. it's a table of nb_values triplets, each of them representing an rgb color.
58
/// color of the low values. same as fHighColor.
60
/// color of the background.
61
gdouble fBackGroundColor[4];
62
/// radius of the corners of the background.
64
/// TRUE to draw all the values on the same graph.
68
typedef struct _CairoDockGraph {
69
CairoDataRenderer dataRenderer;
70
CairoDockTypeGraph iType;
71
gdouble *fHighColor; // iNbValues triplets (r,v,b).
72
gdouble *fLowColor; // idem.
73
cairo_pattern_t **pGradationPatterns; // iNbValues patterns.
74
gdouble fBackGroundColor[4];
75
cairo_surface_t *pBackgroundSurface;
76
GLuint iBackgroundTexture;
83
CairoDockGraph *cairo_dock_new_graph (void);