Number: 1637
Title: Generate easier output for SVG 'rounded,filled' boxes
Submitter: Egon Kastelijn
Date: Tue Apr 28 13:04:54 2009
Subsys: Dot
Version: 2.16.1-0.6.fc10
System: *-Linux-Fedora 10
Severity: minor
Graphviz Dot can generate SVG files for 'rounded,filled' boxes that are defined like this:

digraph process { graph [rankdir=TB]

ff [shape="box" style="filled,rounded"]; }

When Dot is used to generate the SVG file, (dot -Tsvg -o ff.svg) then the filling of the rounded corners of the box are drawn like this: <path style="fill:lightgrey;stroke:lightgrey;" d="M12,-36C6,-36 1.83557e-14,-30 1.53951e-14,-24"/>

And the stroke is drawn like this: <path style="fill:none;stroke:black;" d="M12,-36C6,-36 1.83557e-14,-30 1.53951e-14,-24"/>

This is a rather complex way to generate rounded corners. There is an easier way to generate SVG rounded corners. (the way Inkscape generates them)

       ry="12.595651" />

This way you only need to specify the roundness of the corners using 'ry'.

Why do I think this should be changed? The current way of generating SVG rounded corners does not allow for easy post-processing of the generated SVG. For example, this script does not work nicely on SVG:

kind regards,

Egon Kastelijn
Owner: *
Status: *