import std.stdio; import std.format; import dgraphviz; struct A { auto toString() { return "A\n\"struct\""; } } auto g = new Directed; A a; with (g) { node(a, ["shape": "box", "color": "#ff0000"]); edge(a, true); edge(a, 1, ["style": "dashed", "label": "a-to-1"]); edge(true, "foo"); } g.save("simple.dot");