Commit 107d3c55 authored by Romain Bignon's avatar Romain Bignon

add legend

parent cc496a9d
......@@ -48,7 +48,7 @@ int create_image(struct data* data, const char *filename, struct event* events,
}
const int xgraph = 50;
const int ygraph = 50;
const int ygraph = 100;
const int hgraph = 24*6;
const int wgraph = days;
Imlib_Image image = imlib_create_image(xgraph + wgraph,
......@@ -59,6 +59,17 @@ int create_image(struct data* data, const char *filename, struct event* events,
imlib_add_path_to_font_path("/usr/share/fonts/dejavu");
Imlib_Font font = imlib_load_font("DejaVuSans/10");
imlib_context_set_font(font);
imlib_context_set_color(255, 0, 130, 255);
imlib_image_fill_rectangle(xgraph, 10, 15, 15);
imlib_context_set_color(255, 255, 255, 255);
imlib_text_draw(xgraph + 20, 8, "IRC client running");
imlib_context_set_color(50, 50, 50, 255);
imlib_image_fill_rectangle(xgraph, 35, 15, 15);
imlib_context_set_color(255, 255, 255, 255);
imlib_text_draw(xgraph + 20, 33, "Weekend");
for (i = 0; i < 24; ++i)
{
if (!(i % 2))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment