sig
type pos = float * float
type bounding_box = XDot.pos * XDot.pos
type node_layout = {
n_name : string;
n_pos : XDot.pos;
n_bbox : XDot.bounding_box;
n_draw : XDotDraw.operation list;
n_ldraw : XDotDraw.operation list;
}
type cluster_layout = {
c_pos : XDot.pos;
c_bbox : XDot.bounding_box;
c_draw : XDotDraw.operation list;
c_ldraw : XDotDraw.operation list;
}
type edge_layout = {
e_draw : XDotDraw.operation list;
e_ldraw : XDotDraw.operation list;
e_hdraw : XDotDraw.operation list;
e_tdraw : XDotDraw.operation list;
e_hldraw : XDotDraw.operation list;
e_tldraw : XDotDraw.operation list;
}
val mk_node_layout :
name:string ->
pos:XDot.pos ->
bbox:XDot.bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> XDot.node_layout
val mk_cluster_layout :
pos:XDot.pos ->
bbox:XDot.bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> XDot.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 -> XDot.edge_layout
exception ParseError of string
module Make :
functor (G : Graph.Graphviz.GraphWithDotAttrs) ->
sig
module HV :
sig
type key = G.V.t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
end
module HE :
sig
type key = G.E.t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
end
type graph_layout = {
vertex_layouts : XDot.node_layout XDot.Make.HV.t;
edge_layouts : XDot.edge_layout XDot.Make.HE.t;
cluster_layouts : (string, XDot.cluster_layout) Hashtbl.t;
bbox : XDot.bounding_box;
}
exception DotError of string
val layout_of_xdot :
xdot_file:string -> G.t -> XDot.Make.graph_layout
val layout_of_dot :
?cmd:string -> dot_file:string -> G.t -> XDot.Make.graph_layout
end
val bounding_box : float * float -> float -> float -> XDot.bounding_box
val read_bounding_box : string -> XDot.bounding_box
val read_node_layout :
Graph.Dot_ast.node_id -> Graph.Dot_ast.attr list -> XDot.node_layout
val read_edge_layout : Graph.Dot_ast.attr list -> XDot.edge_layout
val read_cluster_layout : Graph.Dot_ast.attr list -> XDot.cluster_layout
end