Skip to content

Use "none" instead of "transparent" when painting in SVG

Mog Nesbitt requested to merge mogest/graphviz:svg-1.1-compliance into main

The SVG 1.1 spec, which SVGs generated by gvrender_core_svg.c are labeled as, does not have the color "transparent" available which is causing issues with SVG 1.1 parsers.

When specifying paint in the fill or stroke attributes, use "none" instead of "transparent". When specifying a gradient color that has zero opacity, use that color at zero opacity instead of "transparent". When specifying a gradient with the graphviz transparent color, use a zero-opacity black as this is how SVG interprets "transparent" in gradients in SVG 2.0.

This MR was created from issue #1863 (closed).

Merge request reports