2
* Graph 2 headers for Cairo-Dock
4
* Copyright : (C) 2009 by Fabrice Rey
5
* E-mail : fabounet@users.berlios.de
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
* http://www.gnu.org/licenses/licenses.html#GPL
19
#ifndef __CAIRO_DOCK_GRAPH2__
20
#define __CAIRO_DOCK_GRAPH2__
25
#include <cairo-dock-struct.h>
26
#include <cairo-dock-data-renderer.h>
29
CAIRO_DOCK_GRAPH2_LINE=0,
30
CAIRO_DOCK_GRAPH2_PLAIN,
31
CAIRO_DOCK_GRAPH2_BAR,
32
CAIRO_DOCK_GRAPH2_CIRCLE,
33
CAIRO_DOCK_GRAPH2_CIRCLE_PLAIN
34
} CairoDockTypeGraph2;
36
typedef struct _CairoGraph2Attribute CairoGraph2Attribute;
37
struct _CairoGraph2Attribute {
38
CairoDataRendererAttribute rendererAttribute;
39
CairoDockTypeGraph2 iType;
40
gdouble *fHighColor; // iNbValues triplets (r,v,b).
41
gdouble *fLowColor; // idem.
42
gdouble fBackGroundColor[4];
47
typedef struct _CairoDockGraph2 {
48
CairoDataRenderer dataRenderer;
49
CairoDockTypeGraph2 iType;
50
gdouble *fHighColor; // iNbValues triplets (r,v,b).
51
gdouble *fLowColor; // idem.
52
cairo_pattern_t **pGradationPatterns; // iNbValues patterns.
53
gdouble fBackGroundColor[4];
54
cairo_surface_t *pBackgroundSurface;
55
GLuint iBackgroundTexture;
61
void cairo_dock_render_graph2 (CairoDockGraph2 *pGraph, cairo_t *pCairoContext);
63
void cairo_dock_reload_graph2 (CairoDockGraph2 *pGraph, cairo_t *pSourceContext);
65
void cairo_dock_load_graph2 (CairoDockGraph2 *pGraph, cairo_t *pSourceContext, CairoContainer *pContainer, CairoGraph2Attribute *pAttribute);
67
void cairo_dock_free_graph2 (CairoDockGraph2 *pGraph);
69
CairoDockGraph2 *cairo_dock_new_graph2 (void);
72
void cairo_dock_add_watermark_on_graph2 (cairo_t *pSourceContext, CairoDockGraph2 *pGraph, gchar *cImagePath, double fAlpha);