return;
}
- cairo_set_source_rgb(cr, 1, 1, 1);
+ cairo_set_source_rgba(cr, 1, 1, 1, 1);
cairo_paint(cr);
for (i = 0; i != diagram->shape_count; i++) {
render_path(cr, scale, &diagram->shape[i]);
} else if (diagram->shape[i].text) {
- cairo_set_source_rgb(cr,
+ cairo_set_source_rgba(cr,
svgtiny_RED(diagram->shape[i].stroke) / 255.0,
svgtiny_GREEN(diagram->shape[i].stroke) / 255.0,
- svgtiny_BLUE(diagram->shape[i].stroke) / 255.0);
+ svgtiny_BLUE(diagram->shape[i].stroke) / 255.0,
+ diagram->shape[i].stroke_opacity);
cairo_move_to(cr,
scale * diagram->shape[i].text_x,
scale * diagram->shape[i].text_y);
}
}
if (path->fill != svgtiny_TRANSPARENT) {
- cairo_set_source_rgb(cr,
+ cairo_set_source_rgba(cr,
svgtiny_RED(path->fill) / 255.0,
svgtiny_GREEN(path->fill) / 255.0,
- svgtiny_BLUE(path->fill) / 255.0);
+ svgtiny_BLUE(path->fill) / 255.0,
+ path->fill_opacity);
cairo_fill_preserve(cr);
}
if (path->stroke != svgtiny_TRANSPARENT) {
- cairo_set_source_rgb(cr,
+ cairo_set_source_rgba(cr,
svgtiny_RED(path->stroke) / 255.0,
svgtiny_GREEN(path->stroke) / 255.0,
- svgtiny_BLUE(path->stroke) / 255.0);
+ svgtiny_BLUE(path->stroke) / 255.0,
+ path->stroke_opacity);
cairo_set_line_width(cr, scale * path->stroke_width);
cairo_stroke_preserve(cr);
}