COIN-OR::LEMON - Graph Library

Changeset 131:3125084667a3 in lemon-main


Ignore:
Timestamp:
04/15/08 09:56:55 (17 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Changes in interface and internals of graph_to_eps.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_to_eps.h

    r130 r131  
    5050namespace lemon {
    5151
    52 template<class MT>
    53 class _NegY {
    54 public:
    55   typedef typename MT::Key Key;
    56   typedef typename MT::Value Value;
    57   const MT &map;
    58   int yscale;
    59   _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
    60   Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
    61 };
    62 
     52  namespace _graph_to_eps_bits {
     53    template<class MT>
     54    class _NegY {
     55    public:
     56      typedef typename MT::Key Key;
     57      typedef typename MT::Value Value;
     58      const MT &map;
     59      int yscale;
     60      _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
     61      Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
     62    };
     63  }
     64 
    6365///Default traits class of \ref GraphToEps
    6466
     
    159161    _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
    160162    _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
    161     _undirected(false),
     163    _undirected(lemon::UndirectedTagIndicator<G>::value),
    162164    _pleaseRemoveOsStream(_pros), _scaleToA4(false),
    163165    _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK),
     
    669671  ///Sets whether the the graph is directed.
    670672  ///Use it to show the edges as a pair of directed ones.
    671   GraphToEps<T> &bidir(bool b=true) {_undirected=!b;return *this;}
     673  GraphToEps<T> &directed(bool b=true) {_undirected=!b;return *this;}
    672674
    673675  ///Sets the title.
     
    715717    if(dontPrint) return;
    716718   
    717     _NegY<typename T::CoordsMapType> mycoords(_coords,_negY);
     719    _graph_to_eps_bits::_NegY<typename T::CoordsMapType>
     720      mycoords(_coords,_negY);
    718721
    719722    os << "%!PS-Adobe-2.0 EPSF-2.0\n";
Note: See TracChangeset for help on using the changeset viewer.