v.dotgraph #
fn new #
fn new(name string, label string, color string) &DotGraph
fn node_name #
fn node_name(name string, context voidptr) string
fn start_digraph #
fn start_digraph()
type FnLabel2NodeName #
type FnLabel2NodeName = fn (string, voidptr) string
struct DotGraph #
@[heap]
struct DotGraph {
mut:
sb strings.Builder
}
fn (DotGraph) writeln #
fn (mut d DotGraph) writeln(line string)
fn (DotGraph) finish #
fn (mut d DotGraph) finish()
fn (DotGraph) new_node #
fn (mut d DotGraph) new_node(nlabel string, cfg NewNodeConfig)
fn (DotGraph) new_edge #
fn (mut d DotGraph) new_edge(source string, target string, cfg NewEdgeConfig)
struct NewEdgeConfig #
struct NewEdgeConfig {
pub:
should_highlight bool
ctx voidptr = unsafe { nil }
name2node_fn FnLabel2NodeName = node_name
}
struct NewNodeConfig #
struct NewNodeConfig {
pub:
node_name string
should_highlight bool
tooltip string
ctx voidptr = unsafe { nil }
name2node_fn FnLabel2NodeName = node_name
}