[cairo] Output SVG with fill and alpha stroke, but without inline images ?
cworth at cworth.org
Thu May 6 18:46:48 UTC 2021
On Thu, May 06 2021, Stuart Axon wrote:
> The fantastic, @cassiecodes on twitter has found a solution to this using paint order stroke, it seems like a longer term solution is inset or offset strokes.
> https://twitter.com/cassiecodes/status/1390338810911862790SVG transparent stroke.
You should be able to do what you are trying to in SVG by using a
group (that is, a <g> element). The group could be translucent and
contain a path that is both stroked and filled without any translucence,
(so you don't end up with the result you're currently seeing).
And you should be able to achieve a similar result in cairo with code
/* Draw your stroke and filled shape here. */
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, 0.5);
I'm not sure whether the above cairo operations map to clean <g> in SVG,
but if not, then maybe that's the cairo bug you're looking to file?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 832 bytes
Desc: not available
More information about the cairo