}
}
- /* Next, we want to ensure that the data never collides with the
- * ticks. So we expand each axis on its minimum side as needed. */
- cairo_save (cr);
- {
- double x, y;
-
- _set_transform_to_data_space (acre);
-
- x = ACRE_TICK_MAJOR_SIZE + 2.0;
- y = ACRE_TICK_MAJOR_SIZE + 2.0;
- cairo_device_to_user_distance (cr, &x, &y);
-
- acre->x_axis.view_min -= x;
- acre->y_axis.view_min += y;
- }
- cairo_restore (cr);
-
/* Then, increase the axis ranges just enough so that the step
* sizes for the ticks will be integers.
*/
cairo_restore (cr);
}
-static void
-_acre_color_from_hsv (acre_color_t *color,
- double hue,
- double saturation,
- double value)
-{
- double f, p, q, t;
- int hmod6;
-
- hmod6 = (int) floor (hue / 60) % 6;
- f = hue / 60 - floor (hue / 60);
- p = value * (1 - saturation);
- q = value * (1 - f * saturation);
- t = value * (1 - (1 - f) * saturation);
-
- switch (hmod6) {
- case 0:
- color->red = value;
- color->green = t;
- color->blue = p;
- break;
- case 1:
- color->red = q;
- color->green = value;
- color->blue = p;
- break;
- case 2:
- color->red = p;
- color->green = value;
- color->blue = t;
- break;
- case 3:
- color->red = p;
- color->green = q;
- color->blue = value;
- break;
- case 4:
- color->red = t;
- color->green = p;
- color->blue = value;
- break;
- case 5:
- color->red = value;
- color->green = p;
- color->blue = q;
- break;
- }
-}
-
static void
_choose_colors (acre_t *acre)
{