gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Changes in interface and internals of graph_to_eps.h
0 1 0
default
1 file changed with 6 insertions and 3 deletions:
↑ Collapse diff ↑
Show white space 8 line context
... ...
@@ -48,8 +48,9 @@
48 48
///\author Alpar Juttner
49 49

	
50 50
namespace lemon {
51 51

	
52
  namespace _graph_to_eps_bits {
52 53
template<class MT>
53 54
class _NegY {
54 55
public:
55 56
  typedef typename MT::Key Key;
... ...
@@ -58,8 +59,9 @@
58 59
  int yscale;
59 60
  _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
60 61
  Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
61 62
};
63
  }
62 64

	
63 65
///Default traits class of \ref GraphToEps
64 66

	
65 67
///Default traits class of \ref GraphToEps
... ...
@@ -157,9 +159,9 @@
157 159
    _showNodes(true), _showArcs(true),
158 160
    _enableParallel(false), _parArcDist(1),
159 161
    _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
160 162
    _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
161
    _undirected(false),
163
    _undirected(lemon::UndirectedTagIndicator<G>::value),
162 164
    _pleaseRemoveOsStream(_pros), _scaleToA4(false),
163 165
    _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK),
164 166
    _autoNodeScale(false),
165 167
    _autoArcWidthScale(false),
... ...
@@ -667,9 +669,9 @@
667 669
  ///Sets whether the the graph is directed
668 670

	
669 671
  ///Sets whether the the graph is directed.
670 672
  ///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;}
672 674

	
673 675
  ///Sets the title.
674 676

	
675 677
  ///Sets the title of the generated image,
... ...
@@ -713,9 +715,10 @@
713 715
    ///\todo better 'epsilon' would be nice here.
714 716
    const double EPSILON=1e-9;
715 717
    if(dontPrint) return;
716 718
    
717
    _NegY<typename T::CoordsMapType> mycoords(_coords,_negY);
719
    _graph_to_eps_bits::_NegY<typename T::CoordsMapType>
720
      mycoords(_coords,_negY);
718 721

	
719 722
    os << "%!PS-Adobe-2.0 EPSF-2.0\n";
720 723
    if(_title.size()>0) os << "%%Title: " << _title << '\n';
721 724
     if(_copyright.size()>0) os << "%%Copyright: " << _copyright << '\n';
0 comments (0 inline)