src/lemon/graph_to_eps.h
changeset 1417 53c2a0ccc9a4
parent 1367 a490662291b9
     1.1 --- a/src/lemon/graph_to_eps.h	Sat May 14 17:26:56 2005 +0000
     1.2 +++ b/src/lemon/graph_to_eps.h	Sat May 14 17:29:28 2005 +0000
     1.3 @@ -18,7 +18,6 @@
     1.4  #define LEMON_GRAPH_TO_EPS_H
     1.5  
     1.6  #include <sys/time.h>
     1.7 -#include <time.h>
     1.8  
     1.9  #include<iostream>
    1.10  #include<fstream>
    1.11 @@ -26,11 +25,15 @@
    1.12  #include<algorithm>
    1.13  #include<vector>
    1.14  
    1.15 +#include <ctime>
    1.16 +#include <cmath>
    1.17 +
    1.18  #include<lemon/invalid.h>
    1.19  #include<lemon/xy.h>
    1.20  #include<lemon/maps.h>
    1.21  #include<lemon/bezier.h>
    1.22  
    1.23 +
    1.24  ///\ingroup io_group
    1.25  ///\file
    1.26  ///\brief Simple graph drawer
    1.27 @@ -809,7 +812,7 @@
    1.28  	  sw-=_parEdgeDist;
    1.29  	  sw/=-2.0;
    1.30  	  xy<double> dvec(_coords[g.target(*i)]-_coords[g.source(*i)]);
    1.31 -	  double l=sqrt(dvec.normSquare()); 
    1.32 +	  double l=std::sqrt(dvec.normSquare()); 
    1.33  	  ///\todo better 'epsilon' would be nice here.
    1.34  	  xy<double> d(dvec/std::max(l,1e-9));
    1.35   	  xy<double> m;
    1.36 @@ -862,7 +865,7 @@
    1.37  		 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
    1.38  	      xy<double> dd(rot90(linend-apoint));
    1.39  	      dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
    1.40 -		sqrt(dd.normSquare());
    1.41 +		std::sqrt(dd.normSquare());
    1.42  	      os << "newpath " << psOut(apoint) << " moveto "
    1.43  		 << psOut(linend+dd) << " lineto "
    1.44  		 << psOut(linend-dd) << " lineto closepath fill\n";