The following code
digraph test {
a [style="gradient" fillcolor="red" gradientcolor="blue" gradientorientation="TB" ]
}
would result in a node which is filled with a gradient running from red to blue from top to bottom.
Alternatives and examples for the syntax could be:
style="gradient"
style="gradientfilled"
style="filledgradient"
fillcolor="red" (this one is preferred because of reuse of variable names)
gradientstartcolor="red"
gradientendcolor="blue"
gradientcolor="blue" (this one is preferred because of short variable names, default would be black when this style is active since fillcolor is by default white)
gradientorientation="TB" (0 degrees = default)
gradientorientation="LR"
gradientorientation="TLBR" (135 degrees = top left -> bottom right)
gradientorientation="38" (38 degrees)
Rather than postprocess interactively with inkscape, what about generic SVG stream filters? I wonder if any good tools exist.
Of course, we can appreciate the increased complexity of having to maintain separate specifications for Graphviz and the postprocessor (though you can also imagine burying all this under a shell script that calls gpr to get the SVG-modifying arguments, thereby shielding the end user from all this).
[pander] I would like to ask that this feature request is implemented inside graphviz. In the end, it will be more elaborate to maintain different post processes that work only SVG but not on other formats. It will also increase the work the user has to do, platform dependencies etc.
Starting with supporting this for SVG output is pretty straightforward and later on implementations for other formats can come alongside. Once graphviz maintainers agree on how to extend the syntax with one of the proposed examples, I am willing to help implement this for SVG.
[ellson] Since cairo can do gradients, and even these other features, they could reasonably be considered nearly generic across multiple output formats.
I know it would be hard to justify this as core development, but perhaps if we just
decide on an attribute syntax, we could let Pander and/or others develop this?
Owner: *
Status: Request