sig
type color = int
and point = int * int
and node_attributes = {
nd_label : [ `None | `Text of Avl_draw.text_label_attributes];
nd_shape : [ `Box | `Circle | `Ellipse | `Square];
nd_size : [ `FitLabel of int * int | `Fixed of int * int];
nd_border : [ `NoBorder | `Solid of Avl_draw.color * int];
nd_background : [ `Solid of Avl_draw.color | `Transparent];
}
and text_label_attributes = {
tl_text : string;
tl_fontname : string;
tl_fontsize : int;
tl_color : Avl_draw.color;
}
val default_node : Avl_draw.node_attributes
val default_label : Avl_draw.text_label_attributes
type edge_attributes = {
ed_linestyle : [ `Solid of Avl_draw.color * int | `Transparent];
ed_originarrow : Avl_draw.arrow_style;
ed_tailarrow : Avl_draw.arrow_style;
}
and arrow_style =
[ `Filled of int * float * Avl_draw.color
| `Lined of int * float * Avl_draw.color * int
| `None]
val default_edge : Avl_draw.edge_attributes
module type GRAPH =
sig
type graph
and node
and edge
val iter_nodes :
(Avl_draw.GRAPH.node -> unit) -> Avl_draw.GRAPH.graph -> unit
val iter_edges :
(Avl_draw.GRAPH.edge -> unit) -> Avl_draw.GRAPH.graph -> unit
val node_hash : Avl_draw.GRAPH.node -> int
val node_equal : Avl_draw.GRAPH.node -> Avl_draw.GRAPH.node -> bool
val node_attributes : Avl_draw.GRAPH.node -> Avl_draw.node_attributes
val edge_hash : Avl_draw.GRAPH.edge -> int
val edge_equal : Avl_draw.GRAPH.edge -> Avl_draw.GRAPH.edge -> bool
val edge_head : Avl_draw.GRAPH.edge -> Avl_draw.GRAPH.node
val edge_tail : Avl_draw.GRAPH.edge -> Avl_draw.GRAPH.node
val edge_attributes : Avl_draw.GRAPH.edge -> Avl_draw.edge_attributes
end
module type DRAW =
sig
type window
val draw_lines :
Avl_draw.DRAW.window ->
color:Avl_draw.color -> lw:int -> Avl_draw.point list -> unit
val draw_curves :
Avl_draw.DRAW.window ->
color:Avl_draw.color ->
lw:int ->
Avl_draw.point ->
(Avl_draw.point * Avl_draw.point * Avl_draw.point) list -> unit
val draw_rect :
Avl_draw.DRAW.window ->
color:Avl_draw.color ->
lw:int -> x:int -> y:int -> w:int -> h:int -> unit
val draw_ellipse :
Avl_draw.DRAW.window ->
color:Avl_draw.color ->
lw:int -> x:int -> y:int -> rx:int -> ry:int -> unit
val fill_rect :
Avl_draw.DRAW.window ->
color:Avl_draw.color -> x:int -> y:int -> w:int -> h:int -> unit
val fill_ellipse :
Avl_draw.DRAW.window ->
color:Avl_draw.color -> x:int -> y:int -> rx:int -> ry:int -> unit
val fill_poly :
Avl_draw.DRAW.window ->
color:Avl_draw.color -> Avl_draw.point list -> unit
val draw_text :
Avl_draw.DRAW.window ->
color:Avl_draw.color ->
?name:string -> size:int -> x:int -> y:int -> string -> unit
val text_size :
Avl_draw.DRAW.window ->
?name:string -> size:int -> string -> int * int
end
module DrawGraphics : DRAW
module Make :
functor (D : DRAW) ->
functor (G : GRAPH) ->
sig
type engine =
[ `Dot of
[ `Nodesep of int
| `Rankdir of [ `LeftToRight | `TopToBottom]
| `Ranksep of int] list]
val draw_graph :
D.window ->
Avl_draw.Make.engine -> int -> int -> G.graph -> int * int
end
module MakeGraphics :
functor (G : GRAPH) ->
sig
type engine =
[ `Dot of
[ `Nodesep of int
| `Rankdir of [ `LeftToRight | `TopToBottom]
| `Ranksep of int] list]
val draw_graph :
unit ->
Avl_draw.MakeGraphics.engine -> int -> int -> G.graph -> int * int
end
end