summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c73ff9)
raw | patch | inline | side by side (parent: 1c73ff9)
author | Florian Forster <ff@octo.it> | |
Wed, 14 Jul 2010 15:55:38 +0000 (17:55 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 14 Jul 2010 15:55:38 +0000 (17:55 +0200) |
src/graph_def.c | patch | blob | history |
diff --git a/src/graph_def.c b/src/graph_def.c
index 1f78dddf90e16c79f3f3785d8774d9a3f80c5e81..9aba1ce133371e25d27f54248079d99d35d28d90 100644 (file)
--- a/src/graph_def.c
+++ b/src/graph_def.c
return (NULL);
}
- ret->color = get_random_color ();
+ ret->color = UINT32_MAX;
ret->next = NULL;
ret->select = ident_copy_with_selector (selector, ident,
- IDENT_FLAG_REPLACE_ALL);
+ IDENT_FLAG_REPLACE_ANY);
if (ret->select == NULL)
{
ident_destroy (selector);
int index;
char draw_def[64];
char legend[256];
+ uint32_t color;
if ((def == NULL) || (ident == NULL) || (args == NULL))
return (EINVAL);
}
}
+ color = def->color;
+ if (color > 0x00ffffff)
+ color = get_random_color ();
+
index = args->index;
args->index++;
if (def->area)
array_prepend_format (args->areas, "AREA:%s#%06"PRIx32,
- draw_def, fade_color (def->color));
+ draw_def, fade_color (color));
/* Graph part */
array_prepend_format (args->lines, "GPRINT:vdef_%04i_lst:%s last\\l",
array_prepend_format (args->lines, "GPRINT:vdef_%04i_min:%s min,",
index, (def->format != NULL) ? def->format : "%6.2lf");
array_prepend_format (args->lines, "LINE1:%s#%06"PRIx32":%s",
- draw_def, def->color, legend);
+ draw_def, color, legend);
free (file);