#define ACRE_FONT_FAMILY "sans"
#define ACRE_FONT_SIZE 12
-#define ACRE_TITLE_FONT_SIZE 32
+#define ACRE_TITLE_FONT_SIZE 20
#define ACRE_PAD (ACRE_FONT_SIZE)
#define ACRE_TICK_MAJOR_SIZE 6
#define ACRE_TICK_MINOR_SIZE 3
cairo_t *cr = acre->cr;
unsigned int d, i;
acre_data_t *data;
+#define NUM_COLORS 3
+ struct {
+ double r;
+ double g;
+ double b;
+ } colors [NUM_COLORS] = {
+ {1, 0, 0},
+ {0, 1, 0},
+ {0, 0, 1}
+ };
cairo_save (cr);
_set_transform_to_data_space (acre);
for (d = 0; d < acre->num_data; d++) {
+ int color = d % NUM_COLORS;
+ cairo_set_source_rgb (cr,
+ colors[color].r,
+ colors[color].g,
+ colors[color].b);
data = acre->data[d];
cairo_new_path (cr);
for (i = 0; i < data->num_points; i++) {
t += sub_step)
{
int tick_size;
- if (fabs((t / step) - (int) (t / step)) < 0.5 * (sub_step / step))
+ if (fabs((t / step) - round (t / step)) < 0.5 * (sub_step / step))
tick_size = ACRE_TICK_MAJOR_SIZE;
else
tick_size = ACRE_TICK_MINOR_SIZE;