module XDot:sig
..end
typepos =
float * float
typebounding_box =
pos * pos
Each node or edge layout thus contains several lists of drawing operations.
See http://www.graphviz.org/doc/info/output.html#d:xdot
to understand the details of the layout informations.
type
node_layout = {
|
n_name : |
(* |
Dot label
| *) |
|
n_pos : |
(* |
Center position
| *) |
|
n_bbox : |
(* |
Bounding box
| *) |
|
n_draw : |
(* |
Shape drawing
| *) |
|
n_ldraw : |
(* |
Label drawing
| *) |
type
cluster_layout = {
|
c_pos : |
|
c_bbox : |
|
c_draw : |
|
c_ldraw : |
type
edge_layout = {
|
e_draw : |
(* |
Shapes and curves
| *) |
|
e_ldraw : |
(* |
Label drawing
| *) |
|
e_hdraw : |
(* |
Head arrowhead drawing
| *) |
|
e_tdraw : |
(* |
Tail arrowhead drawing
| *) |
|
e_hldraw : |
(* |
Head label drawing
| *) |
|
e_tldraw : |
(* |
Tail label drawing
| *) |
val mk_node_layout : name:string ->
pos:pos ->
bbox:bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> node_layout
val mk_cluster_layout : pos:pos ->
bbox:bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> 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_layout
exception ParseError of string
module Make:
val bounding_box : float * float -> float -> float -> bounding_box
bounding_box pos w h
converts a bounding box of center pos
,
width w
and height h
from a Dot file to a pair of corners
(lower left and upper right) in the world coordinate system.val read_bounding_box : string -> bounding_box
val read_node_layout : Graph.Dot_ast.node_id -> Graph.Dot_ast.attr list -> node_layout
val read_edge_layout : Graph.Dot_ast.attr list -> edge_layout
val read_cluster_layout : Graph.Dot_ast.attr list -> cluster_layout