Replace xstringl by stringbox.
Jean-baptiste Silvy [Thu, 14 Aug 2008 16:41:14 +0000 (16:41 +0000)]
scilab/modules/metanet/macros/editor/ge_draw_edge.sci
scilab/modules/metanet/macros/editor/ge_draw_graph.sci

index b22b0bf..8314a61 100644 (file)
@@ -50,7 +50,8 @@ function e=ge_draw_edge(n)
   vis=Id<>[]
   font=ge_get_edge_font(n)
   if Id==[] then Id=' ',end
-  r=xstringl(0,0,Id,font(2),font(1));r=r(3)
+  r = stringbox(Id, 0, 0, 0, font(2), font(1));
+  r = abs(r(1,3) - r(1,1));
   if ang>90&ang<270 then //co negatif
     a=ang*%pi/180
     xstring(xyl(1)+r*cos(a),xyl(2)-r*sin(a),Id,ang+180 );
index 64f6618..78d2dd0 100644 (file)
@@ -19,23 +19,18 @@ function ge_draw_graph(GraphList)
   gindex=ge_axes_handle.user_data
   
   hnodes=[];
-  tic();
   for k=1:size(GraphList.nodes.graphics.x,'*'), 
     hnodes(k)=ge_draw_node(k); 
     //if modulo(k,40)==0 then drawnow();show_pixmap();drawlater(),end
   end
-  disp(toc())
-  tic();
   hedges=[];
   for k=1:size(GraphList.edges.tail,'*'), 
     hedges(k)=ge_draw_edge(k),
     //if modulo(k,40)==0 then drawnow();show_pixmap();drawlater(),end
   end
-  disp(toc());
   
   gindex.node=hnodes;gindex.edge=hedges;
   ge_axes_handle.user_data=gindex;
   
-  drawnow();
-show_pixmap()
+  drawnow();show_pixmap();
 endfunction