Module Graph.XDot
Reads layout information from xdot ASTs
type node_layout={n_name : string;Dot label
n_pos : pos;Center position
n_bbox : bounding_box;Bounding box
n_draw : XDotDraw.operation list;Shape drawing
n_ldraw : XDotDraw.operation list;Label drawing
}Each node has at least a position and a bounding box.
type cluster_layout={c_pos : pos;c_bbox : bounding_box;c_draw : XDotDraw.operation list;c_ldraw : XDotDraw.operation list;}type edge_layout={e_draw : XDotDraw.operation list;Shapes and curves
e_ldraw : XDotDraw.operation list;Label drawing
e_hdraw : XDotDraw.operation list;Head arrowhead drawing
e_tdraw : XDotDraw.operation list;Tail arrowhead drawing
e_hldraw : XDotDraw.operation list;Head label drawing
e_tldraw : XDotDraw.operation list;Tail label drawing
}
val mk_node_layout : name:string -> pos:pos -> bbox:bounding_box -> draw:XDotDraw.operation list -> ldraw:XDotDraw.operation list -> node_layoutCreates a node layout
val mk_cluster_layout : pos:pos -> bbox:bounding_box -> draw:XDotDraw.operation list -> ldraw:XDotDraw.operation list -> cluster_layoutCreates a cluster layout
val mk_edge_layout : draw:XDotDraw.operation list -> ldraw:XDotDraw.operation list -> hdraw:XDotDraw.operation list -> tdraw:XDotDraw.operation list -> hldraw:XDotDraw.operation list -> tldraw:XDotDraw.operation list -> edge_layoutCreates an edge layout
module Make : functor (G : Graphviz.GraphWithDotAttrs) -> sig ... endInstantiates a module which creates graph layouts from xdot files
val bounding_box : (float * float) -> float -> float -> bounding_boxbounding_box pos w hconverts a bounding box of centerpos, widthwand heighthfrom a Dot file to a pair of corners (lower left and upper right) in the world coordinate system.- parameter pos
position of the center of the node
- parameter w
width of the node
- parameter h
height of the node
val read_bounding_box : string -> bounding_boxval read_node_layout : Dot_ast.node_id -> Dot_ast.attr list -> node_layoutReads xdot layouts from the dot ast
val read_edge_layout : Dot_ast.attr list -> edge_layoutval read_cluster_layout : Dot_ast.attr list -> cluster_layout