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;
  }
  type ('a, 'b, 'c) graph_layout = {
    vertex_layouts : ('a, XDot.node_layout) Hashtbl.t;
    edge_layouts : ('b, XDot.edge_layout) Hashtbl.t;
    cluster_layouts : ('c, XDot.cluster_layout) Hashtbl.t;
    bbox : XDot.bounding_box;
  }
  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
        exception DotError of string
        val layout_of_xdot :
          xdot_file:string ->
          G.t -> (G.vertex, G.edge, string) XDot.graph_layout
        val layout_of_dot :
          ?cmd:string ->
          dot_file:string ->
          G.t -> (G.vertex, G.edge, string) XDot.graph_layout
      end
  val conv_coord : float * float -> float * float
  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