}
}
if (path->fill != svgtiny_TRANSPARENT) {
- cairo_set_source_rgb(cr,
- svgtiny_RED(path->fill) / 255.0,
- svgtiny_GREEN(path->fill) / 255.0,
- svgtiny_BLUE(path->fill) / 255.0);
+ cairo_set_source_rgba(cr,
+ svgtiny_RED(path->fill) / 255.0,
+ svgtiny_GREEN(path->fill) / 255.0,
+ svgtiny_BLUE(path->fill) / 255.0,
+ 1);
cairo_fill_preserve(cr);
}
if (path->stroke != svgtiny_TRANSPARENT) {
- cairo_set_source_rgb(cr,
- svgtiny_RED(path->stroke) / 255.0,
- svgtiny_GREEN(path->stroke) / 255.0,
- svgtiny_BLUE(path->stroke) / 255.0);
+ cairo_set_source_rgba(cr,
+ svgtiny_RED(path->stroke) / 255.0,
+ svgtiny_GREEN(path->stroke) / 255.0,
+ svgtiny_BLUE(path->stroke) / 255.0,
+ 1);
cairo_set_line_width(cr, path->stroke_width);
cairo_stroke_preserve(cr);
}
cairo_status_t crs;
unsigned int i;
- surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
+ surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
diagram->width,
diagram->height);
return NULL;
}
- cairo_set_source_rgb(cr, 1, 1, 1);
+ cairo_set_source_rgba(cr, 0, 0, 0, 0);
cairo_paint(cr);
/* Loop through the shapes in the diagram... */
if (diagram->shape[i].text) {
/* Figure out what color to use from the R/G/B components of the
shape's stroke. */
- cairo_set_source_rgb(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);
+ 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,
+ 1);
/* Then move to the actual position of the text within the
shape... */
cairo_move_to(cr,