int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
int *width, int *height, int *brk);
int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
int *width, int *height, int *brk);
+static void
+set_source_rgba (cairo_t *cairo, const struct cell_color *color)
+{
+ cairo_set_source_rgba (cairo,
+ color->r / 255., color->g / 255., color->b / 255.,
+ color->alpha / 255.);
+}
+
static void
dump_line (struct xr_driver *xr, int x0, int y0, int x1, int y1, int style,
const struct cell_color *color)
{
cairo_new_path (xr->cairo);
static void
dump_line (struct xr_driver *xr, int x0, int y0, int x1, int y1, int style,
const struct cell_color *color)
{
cairo_new_path (xr->cairo);
- cairo_set_source_rgb (xr->cairo,
- color->r / 255.0, color->g / 255.0, color->b / 255.0);
+ set_source_rgba (xr->cairo, color);
- cairo_set_source_rgb (xr->cairo,
- cell->style->font_style.bg[color_idx].r / 255.,
- cell->style->font_style.bg[color_idx].g / 255.,
- cell->style->font_style.bg[color_idx].b / 255.);
+ set_source_rgba (xr->cairo, &cell->style->font_style.bg[color_idx]);
- cairo_set_source_rgb (xr->cairo,
- cell->style->font_style.fg[color_idx].r / 255.,
- cell->style->font_style.fg[color_idx].g / 255.,
- cell->style->font_style.fg[color_idx].b / 255.);
+ set_source_rgba (xr->cairo, &cell->style->font_style.fg[color_idx]);