static double pango_font_red;
static double pango_font_green;
static double pango_font_blue;
+static double pango_font_alpha;
/* Necessary to track whether the dpi changes and trigger a LOG() message,
* which is more easily visible to users. */
pango_layout_set_text(layout, text, text_len);
/* Do the drawing */
- cairo_set_source_rgb(cr, pango_font_red, pango_font_green, pango_font_blue);
+ cairo_set_source_rgba(cr, pango_font_red, pango_font_green, pango_font_blue, pango_font_alpha);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
pango_cairo_update_layout(cr, layout);
pango_layout_get_pixel_size(layout, NULL, &height);
/* Center the piece of text vertically if its height is smaller than the
pango_font_red = ((foreground >> 16) & 0xff) / 255.0;
pango_font_green = ((foreground >> 8) & 0xff) / 255.0;
pango_font_blue = (foreground & 0xff) / 255.0;
+ pango_font_alpha = ((foreground >> 24) & 0xff) / 255.0;
break;
#endif
default: