[cairo] Output SVG with fill and alpha stroke, but without inline images ?
stuaxo2 at yahoo.com
Thu Mar 25 00:19:09 UTC 2021
I've been poking at the cairo source code to see if it's possible, but haven't worked it out yet.
To test how various apps render something like this, I created this SVG:https://www.svgshare.com/s/VPP
It's a rectangle with a stroke with alpha.For everything I tried on Linux, the stroke has two colours, because half of it is over where the fill draws to, and that shows through.
I think there's a fair chance everything I tried (Firefox, Chrome (Linux), Edge (Linux)), may have actually used cairo.
This is probably out of cairos scope, but:
I can't imagine a use-case where someone creating an svg with both fill and stroke is set would expect a 3rd colour to be generated where part of the stroke overlays the fill (it makes sense in cairo, but shouldn't in SVG).
Anyway, I guess I should file bugs upstream for this.
On Wednesday, March 24, 2021, 1:22:25 AM GMT, Stuart Axon <stuaxo2 at yahoo.com> wrote:
I've been trying to generate an SVG using SVGSurface with a fill and an alpha stroke,
with OPERATOR_SOURCE to ensure the stroke draws over the fill, but this seemsto generate <image> tags in the SVG.
Toy example and output + XML:
Is there any way to render fill + stroke (with alpha) and only output vector data ?This seems like a common operation, but whatever I try outputs SVGs full of <image>s.
For Shoebot, this has meant our SVGs become very very large, enough to eat all your ram if you try and open them in Inkscape.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo