graphviz-java
graphviz-java copied to clipboard
How to set `fillcolor` for kotlin DSL?
fun <T : Comparable<T>> BinaryTree<T>.toGraphviz(): Graphviz =
graph(directed = true) {
node[
Color.DARKSLATEGRAY,
"fillcolor" eq "azure2",
Font.name("Ubuntu Mono"),
Font.size(20),
Style.FILLED,
]
}
.addNode(this)
.toGraphviz()
In this code, outline color can be set using Color.DARKSLATEGRAY, however I could not find a way to do the same for fillcolor, and had to use "attr" eq "value" notation.
Are there a way to set fillcolor the same way as color? Being able to use java.Color for fillcolor would be useful since "attr" eq "value" cannot type check.