1.1 --- a/lemon/graph_to_eps.h Sun Jul 13 19:51:02 2008 +0100
1.2 +++ b/lemon/graph_to_eps.h Sun Jul 13 20:09:47 2008 +0100
1.3 @@ -142,7 +142,8 @@
1.4 ///Constructor
1.5 ///\param _g Reference to the graph to be printed.
1.6 ///\param _os Reference to the output stream.
1.7 - ///\param _os Reference to the output stream. By default it is <tt>std::cout</tt>.
1.8 + ///\param _os Reference to the output stream.
1.9 + ///By default it is <tt>std::cout</tt>.
1.10 ///\param _pros If it is \c true, then the \c ostream referenced by \c _os
1.11 ///will be explicitly deallocated by the destructor.
1.12 DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout,
1.13 @@ -781,9 +782,11 @@
1.14 //x1 y1 x2 y2 x3 y3 cr cg cb w
1.15 os << "/lb { setlinewidth setrgbcolor newpath moveto\n"
1.16 << " 4 2 roll 1 index 1 index curveto stroke } bind def\n";
1.17 - os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def\n";
1.18 + os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke }"
1.19 + << " bind def\n";
1.20 //x y r
1.21 - os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def\n";
1.22 + os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath }"
1.23 + << " bind def\n";
1.24 //x y r
1.25 os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n"
1.26 << " 2 index 1 index sub 2 index 2 index add lineto\n"
1.27 @@ -811,8 +814,10 @@
1.28 << " 1.5 mul mul setlinewidth\n"
1.29 << " newpath 5 index 5 index moveto "
1.30 << "5 index 5 index 5 index 3.01 mul sub\n"
1.31 - << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto\n"
1.32 - << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke\n"
1.33 + << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub"
1.34 + << " moveto\n"
1.35 + << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto "
1.36 + << "stroke\n"
1.37 << " 5 index 5 index 5 index c fill\n"
1.38 << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
1.39 << " } bind def\n";
1.40 @@ -826,7 +831,8 @@
1.41 << " 1 index 1 index lineto\n"
1.42 << " 1 index 1 index 7 index sub moveto\n"
1.43 << " 1 index 1 index lineto\n"
1.44 - << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto\n"
1.45 + << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub"
1.46 + << " lineto\n"
1.47 << " stroke\n"
1.48 << " 5 index 5 index 5 index c fill\n"
1.49 << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
1.50 @@ -838,9 +844,10 @@
1.51 // l dx_norm dy_norm
1.52 os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n";
1.53 //len w dx_norm dy_norm x1 y1 cr cg cb
1.54 - os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def\n"
1.55 + os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx "
1.56 + << "exch def\n"
1.57 << " /w exch def /len exch def\n"
1.58 - // << " 0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"
1.59 + //<< "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"
1.60 << " newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto\n"
1.61 << " len w sub arrl sub dx dy lrl\n"
1.62 << " arrw dy dx neg lrl\n"
1.63 @@ -902,7 +909,8 @@
1.64 //\todo better 'epsilon' would be nice here.
1.65 dim2::Point<double> d(dvec/std::max(l,EPSILON));
1.66 dim2::Point<double> m;
1.67 -// m=dim2::Point<double>(mycoords[g.target(*i)]+mycoords[g.source(*i)])/2.0;
1.68 +// m=dim2::Point<double>(mycoords[g.target(*i)]+
1.69 +// mycoords[g.source(*i)])/2.0;
1.70
1.71 // m=dim2::Point<double>(mycoords[g.source(*i)])+
1.72 // dvec*(double(_nodeSizes[g.source(*i)])/
1.73 @@ -938,7 +946,8 @@
1.74 // node_shape=_nodeShapes[g.source(*e)];
1.75 // t1=0;t2=1;
1.76 // for(int i=0;i<INTERPOL_PREC;++i)
1.77 -// if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t1=(t1+t2)/2;
1.78 +// if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape))
1.79 +// t1=(t1+t2)/2;
1.80 // else t2=(t1+t2)/2;
1.81 // bez=bez.after((t1+t2)/2);
1.82 os << _arcWidths[*e]*_arcWidthScale << " setlinewidth "