1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
(**************************************************************************)
(* *)
(* Ocamlgraph: a generic graph library for OCaml *)
(* Copyright (C) 2004-2010 *)
(* Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles *)
(* *)
(* This software is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Library General Public *)
(* License version 2.1, with the special exception on linking *)
(* described in file LICENSE. *)
(* *)
(* This software is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *)
(* *)
(**************************************************************************)
module type TREE = sig
type t
type label
val children : t -> t list
val label : t -> label
end ;;
module type HTREE = sig
type t
type label
val children : t -> t list
val label : t -> label
type coord = float * float
type driver = {
rlimit : float ;
moveto : coord -> unit ;
lineto : coord -> unit ;
curveto : coord -> coord -> coord -> unit ;
draw_label : label -> coord -> float -> unit ;
init_edge_pass : unit -> unit ;
init_label_pass : unit -> unit ;
finalize : unit -> unit ;
}
val shrink_factor : coord -> float
val drag_origin : coord -> coord -> coord -> coord
val draw_linear_tree : driver -> t -> coord -> float -> unit
val draw_curved_tree : driver -> t -> coord -> float -> unit
end ;;
module Make(T : TREE) :
HTREE with type t = T.t and type label = T.label ;;
|