CairoSVG
CairoSVG copied to clipboard
Add filters
Filters handled by cairo can be easily managed, but it's really hard for the other ones.
See: https://github.com/Kozea/CairoSVG/tree/master/test/fail/filter.
Some tests have been fixed by 7f4ac3cb9f and 7004283053.
Are filters not supported? I have an SVG with some feGaussianBlur
filters, but when I render to png, I cannot see them applied.
Are filters not supported? I have an SVG with some
feGaussianBlur
filters, but when I render to png, I cannot see them applied.
It's not supported.
Some filters are already included in Cairo operators and blending modes, and they could be quite easily supported by CairoSVG. But some are not.
Gaussian blurs for example are raster transformations (and so are filters based on convolution matrices). Raster transformations are not easy to implement in Cairo, because they rely on computations on pixels while Cairo can render vector graphics.
If anyone finds a cool solution, I'm ready to implement it. But I've already spent a lot of time on this for WeasyPrint, and I wasn't satisfied with the result.