# HG changeset patch # User Alpar Juttner # Date 1208246215 -3600 # Node ID 3125084667a3404ac174ce4a510e7ddcdd5ffae0 # Parent 88c4f7943b755419218176a17a517c85a0ba2013 Changes in interface and internals of graph_to_eps.h diff -r 88c4f7943b75 -r 3125084667a3 lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Sun Apr 13 08:20:43 2008 +0100 +++ b/lemon/graph_to_eps.h Tue Apr 15 08:56:55 2008 +0100 @@ -49,17 +49,19 @@ namespace lemon { -template -class _NegY { -public: - typedef typename MT::Key Key; - typedef typename MT::Value Value; - const MT ↦ - int yscale; - _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {} - Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);} -}; - + namespace _graph_to_eps_bits { + template + class _NegY { + public: + typedef typename MT::Key Key; + typedef typename MT::Value Value; + const MT ↦ + int yscale; + _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {} + Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);} + }; + } + ///Default traits class of \ref GraphToEps ///Default traits class of \ref GraphToEps @@ -158,7 +160,7 @@ _enableParallel(false), _parArcDist(1), _showNodeText(false), _nodeTexts(false), _nodeTextSize(1), _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0), - _undirected(false), + _undirected(lemon::UndirectedTagIndicator::value), _pleaseRemoveOsStream(_pros), _scaleToA4(false), _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK), _autoNodeScale(false), @@ -668,7 +670,7 @@ ///Sets whether the the graph is directed. ///Use it to show the edges as a pair of directed ones. - GraphToEps &bidir(bool b=true) {_undirected=!b;return *this;} + GraphToEps &directed(bool b=true) {_undirected=!b;return *this;} ///Sets the title. @@ -714,7 +716,8 @@ const double EPSILON=1e-9; if(dontPrint) return; - _NegY mycoords(_coords,_negY); + _graph_to_eps_bits::_NegY + mycoords(_coords,_negY); os << "%!PS-Adobe-2.0 EPSF-2.0\n"; if(_title.size()>0) os << "%%Title: " << _title << '\n';