1.1 --- a/lemon/graph_to_eps.h Sun Apr 13 08:20:43 2008 +0100
1.2 +++ b/lemon/graph_to_eps.h Tue Apr 15 08:56:55 2008 +0100
1.3 @@ -49,17 +49,19 @@
1.4
1.5 namespace lemon {
1.6
1.7 -template<class MT>
1.8 -class _NegY {
1.9 -public:
1.10 - typedef typename MT::Key Key;
1.11 - typedef typename MT::Value Value;
1.12 - const MT ↦
1.13 - int yscale;
1.14 - _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
1.15 - Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
1.16 -};
1.17 -
1.18 + namespace _graph_to_eps_bits {
1.19 + template<class MT>
1.20 + class _NegY {
1.21 + public:
1.22 + typedef typename MT::Key Key;
1.23 + typedef typename MT::Value Value;
1.24 + const MT ↦
1.25 + int yscale;
1.26 + _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
1.27 + Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
1.28 + };
1.29 + }
1.30 +
1.31 ///Default traits class of \ref GraphToEps
1.32
1.33 ///Default traits class of \ref GraphToEps
1.34 @@ -158,7 +160,7 @@
1.35 _enableParallel(false), _parArcDist(1),
1.36 _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
1.37 _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
1.38 - _undirected(false),
1.39 + _undirected(lemon::UndirectedTagIndicator<G>::value),
1.40 _pleaseRemoveOsStream(_pros), _scaleToA4(false),
1.41 _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK),
1.42 _autoNodeScale(false),
1.43 @@ -668,7 +670,7 @@
1.44
1.45 ///Sets whether the the graph is directed.
1.46 ///Use it to show the edges as a pair of directed ones.
1.47 - GraphToEps<T> &bidir(bool b=true) {_undirected=!b;return *this;}
1.48 + GraphToEps<T> &directed(bool b=true) {_undirected=!b;return *this;}
1.49
1.50 ///Sets the title.
1.51
1.52 @@ -714,7 +716,8 @@
1.53 const double EPSILON=1e-9;
1.54 if(dontPrint) return;
1.55
1.56 - _NegY<typename T::CoordsMapType> mycoords(_coords,_negY);
1.57 + _graph_to_eps_bits::_NegY<typename T::CoordsMapType>
1.58 + mycoords(_coords,_negY);
1.59
1.60 os << "%!PS-Adobe-2.0 EPSF-2.0\n";
1.61 if(_title.size()>0) os << "%%Title: " << _title << '\n';