win#browserImage#set_file (MatitaMisc.image_path "meegg.png"))
in
let load_coerchgraph tred () =
- let str = CoercGraph.generate_dot_file () in
+ let module Pp = GraphvizPp.Dot in
let filename, oc = Filename.open_temp_file "matita" ".dot" in
- output_string oc str;
+ let fmt = Format.formatter_of_out_channel oc in
+ Pp.header
+ ~name:"Coercions"
+ ~node_attrs:["fontsize", "9"; "width", ".4"; "height", ".4"]
+ ~edge_attrs:["fontsize", "10"] fmt;
+ let status = (MatitaScript.current ())#grafite_status in
+ NCicCoercion.generate_dot_file status fmt;
+ Pp.trailer fmt;
+ Pp.header
+ ~name:"OLDCoercions"
+ ~node_attrs:["fontsize", "9"; "width", ".4"; "height", ".4"]
+ ~edge_attrs:["fontsize", "10"] fmt;
+ CoercGraph.generate_dot_file fmt;
+ Pp.trailer fmt;
+ Pp.raw "@." fmt;
close_out oc;
if tred then
- gviz#load_graph_from_file ~gviz_cmd:"tred|dot" filename
+ gviz#load_graph_from_file
+ ~gviz_cmd:"dot -Txdot | tred |gvpack -gv | dot" filename
else
- gviz#load_graph_from_file filename;
+ gviz#load_graph_from_file
+ ~gviz_cmd:"dot -Txdot | gvpack -gv | dot" filename;
HExtlib.safe_remove filename
in
object (self)