Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set fillcolor for kotlin DSL? #243

Open
scarf005 opened this issue Jan 2, 2023 · 0 comments
Open

How to set fillcolor for kotlin DSL? #243

scarf005 opened this issue Jan 2, 2023 · 0 comments

Comments

@scarf005
Copy link

scarf005 commented Jan 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant