- (QName.to_string (T.tag tree node))
- (1.0 -. (float (last_round+1) /. float (!max_round+1)))
- (if marked then "oval" else "box") ;
- fprintf ohtml "data['%s'] = new Array();\n" s_node;
- M.iter
- (fun i s -> fprintf ohtml "data['%s'][%i] = '%s';\n" s_node i s)
- m;
- if parent != T.nil then
- fprintf odot "node%i -> %s;\n"
- (T.preorder tree parent) s_node;
- loop odot ohtml (T.first_child tree node) node;
- loop odot ohtml (T.next_sibling tree node) parent
+ x y
+ lbox
+ scolor
+ (if marked
+ then ";stroke-width:4"
+ else ";stroke-width:2;stroke-dasharray:2,2");
+ fprintf output "<text x=\"%i\" y=\"%i\" style=\"fill:%s;font-size:17;\
+font-family:typewriter;\" onclick=\"activate(\'%s\');\" >%s</text>\n"
+ (x+10)
+ (y+15)
+ tcolor s_node tag;
+ let first = T.first_child tree node in
+ let maxw1, maxy1 = loop output first node x (y + 40) in
+ let next = T.next_sibling tree node in
+ let x_next = max (x+lbox) (maxw1+10) in
+ if node != root then begin
+ if node == T.first_child tree parent then
+ fprintf output "<line x1=\"%i\" y1=\"%i\" x2=\"%i\" y2=\"%i\"\
+style=\"stroke:rgb(0,0,0);stroke-width:2\"/>\n"
+ (x + lbox / 2) (y-20) (x + lbox / 2) (y);
+ if next != T.nil then
+ fprintf output "<line x1=\"%i\" y1=\"%i\" x2=\"%i\" y2=\"%i\"\
+style=\"stroke:rgb(0,0,0);stroke-width:2\"/>\n"
+ (x + lbox) (y+10) x_next (y+10);
+ end;
+ let maxw2, maxy2 = loop output next node x_next y in
+ maxw2, max maxy1 maxy2