Commits

Anonymous committed 55725a0

[project @ Arch-1:yminsky@cs.cornell.edu--2004%planets--mainline--1.0--patch-1]
Fixed bug in trace creation

Comments (0)

Files changed (1)

 	      end)
 
 (********************************************************)
-(**  Color Operations  **********************************)
+(***  Color Operations  *********************************)
 (********************************************************)
 
 let intensity r g b  = sqrt ((float_of_int r)**2.0 +.
 (************************************************)
 
 class dtrace () = 
-  let tag = Canvas.create_line ~xys:[] (canvas ()) in
+  let tag = 
+    try Canvas.create_line ~xys:[(0,0);(0,0)] (canvas ()) 
+    with e -> failwith (sprintf "line drawing failed: %s" (Printexc.to_string e))
+  in
   let _ = Canvas.configure_line ~smooth:false (canvas ()) tag in
 object (self)
   inherit [trace] display_item tag