projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed useless empty line
[psensor.git]
/
src
/
graph.c
diff --git
a/src/graph.c
b/src/graph.c
index
9f87eda
..
0ac3143
100644
(file)
--- a/
src/graph.c
+++ b/
src/graph.c
@@
-297,6
+297,7
@@
static void draw_sensor_smooth_curve(struct psensor *s,
int i, dt, vdt, j, k, found;
double x[4], y[4], v;
time_t t, t0, *stimes;
int i, dt, vdt, j, k, found;
double x[4], y[4], v;
time_t t, t0, *stimes;
+ GdkRGBA *color;
if (!times)
times = g_hash_table_new_full(g_str_hash,
if (!times)
times = g_hash_table_new_full(g_str_hash,
@@
-306,10
+307,13
@@
static void draw_sensor_smooth_curve(struct psensor *s,
stimes = g_hash_table_lookup(times, s->id);
stimes = g_hash_table_lookup(times, s->id);
+ color = config_get_sensor_color(s->id);
+
cairo_set_source_rgb(cr,
cairo_set_source_rgb(cr,
- s->color->red,
- s->color->green,
- s->color->blue);
+ color->red,
+ color->green,
+ color->blue);
+ gdk_rgba_free(color);
/* search the index of the first measure used as a start point
* of a Bezier curve. The start and end points of the Bezier
/* search the index of the first measure used as a start point
* of a Bezier curve. The start and end points of the Bezier
@@
-399,11
+403,14
@@
static void draw_sensor_curve(struct psensor *s,
{
int first, i, t, dt, vdt;
double v, x, y;
{
int first, i, t, dt, vdt;
double v, x, y;
+ GdkRGBA *color;
+ color = config_get_sensor_color(s->id);
cairo_set_source_rgb(cr,
cairo_set_source_rgb(cr,
- s->color->red,
- s->color->green,
- s->color->blue);
+ color->red,
+ color->green,
+ color->blue);
+ gdk_rgba_free(color);
dt = et - bt;
first = 1;
dt = et - bt;
first = 1;