src/lemon/graph_to_eps.h
changeset 1234 49d018060749
parent 1202 da44ee225dad
child 1287 984723507b86
     1.1 --- a/src/lemon/graph_to_eps.h	Mon Mar 21 11:40:08 2005 +0000
     1.2 +++ b/src/lemon/graph_to_eps.h	Mon Mar 21 11:46:13 2005 +0000
     1.3 @@ -26,6 +26,7 @@
     1.4  #include<algorithm>
     1.5  #include<vector>
     1.6  
     1.7 +#include<lemon/invalid.h>
     1.8  #include<lemon/xy.h>
     1.9  #include<lemon/maps.h>
    1.10  #include<lemon/bezier.h>
    1.11 @@ -191,11 +192,6 @@
    1.12  
    1.13    ConstMap<typename Graph::Edge,double > _edgeWidths;
    1.14  
    1.15 -  static const double A4HEIGHT = 841.8897637795276;
    1.16 -  static const double A4WIDTH  = 595.275590551181;
    1.17 -  static const double A4BORDER = 15;
    1.18 -
    1.19 -  
    1.20    double _edgeWidthScale;
    1.21    
    1.22    double _nodeScale;
    1.23 @@ -271,6 +267,58 @@
    1.24  /// - A second color and percent value for the lines.
    1.25  template<class T> class GraphToEps : public T 
    1.26  {
    1.27 +  // Can't believe it is required by the C++ standard
    1.28 +  using T::g;
    1.29 +  using T::os;
    1.30 +
    1.31 +  using T::_coords;
    1.32 +  using T::_nodeSizes;
    1.33 +  using T::_nodeShapes;
    1.34 +  using T::_nodeColors;
    1.35 +  using T::_edgeColors;
    1.36 +  using T::_edgeWidths;
    1.37 +
    1.38 +  using T::_edgeWidthScale;
    1.39 +  using T::_nodeScale;
    1.40 +  using T::_xBorder;
    1.41 +  using T::_yBorder;
    1.42 +  using T::_scale;
    1.43 +  using T::_nodeBorderQuotient;
    1.44 +  
    1.45 +  using T::_drawArrows;
    1.46 +  using T::_arrowLength;
    1.47 +  using T::_arrowWidth;
    1.48 +  
    1.49 +  using T::_showNodes;
    1.50 +  using T::_showEdges;
    1.51 +
    1.52 +  using T::_enableParallel;
    1.53 +  using T::_parEdgeDist;
    1.54 +
    1.55 +  using T::_showNodeText;
    1.56 +  using T::_nodeTexts;  
    1.57 +  using T::_nodeTextSize;
    1.58 +
    1.59 +  using T::_showNodePsText;
    1.60 +  using T::_nodePsTexts;  
    1.61 +  using T::_nodePsTextsPreamble;
    1.62 +  
    1.63 +  using T::_undir;
    1.64 +  using T::_pleaseRemoveOsStream;
    1.65 +
    1.66 +  using T::_scaleToA4;
    1.67 +
    1.68 +  using T::_title;
    1.69 +  using T::_copyright;
    1.70 +
    1.71 +  using T::NodeTextColorType;
    1.72 +  using T::CUST_COL;
    1.73 +  using T::DIST_COL;
    1.74 +  using T::DIST_BW;
    1.75 +  using T::_nodeTextColorType;
    1.76 +  using T::_nodeTextColors;
    1.77 +  // dradnats ++C eht yb deriuqer si ti eveileb t'naC
    1.78 +
    1.79    typedef typename T::Graph Graph;
    1.80    typedef typename Graph::Node Node;
    1.81    typedef typename Graph::NodeIt NodeIt;
    1.82 @@ -280,6 +328,9 @@
    1.83    typedef typename Graph::OutEdgeIt OutEdgeIt;
    1.84  
    1.85    static const int INTERPOL_PREC=20;
    1.86 +  static const double A4HEIGHT = 841.8897637795276;
    1.87 +  static const double A4WIDTH  = 595.275590551181;
    1.88 +  static const double A4BORDER = 15;
    1.89  
    1.90    bool dontPrint;
    1.91  
    1.92 @@ -323,8 +374,10 @@
    1.93    };
    1.94    bool isParallel(Edge e,Edge f) const
    1.95    {
    1.96 -    return (g.source(e)==g.source(f)&&g.target(e)==g.target(f))||
    1.97 -      (g.source(e)==g.target(f)&&g.target(e)==g.source(f));
    1.98 +    return (g.source(e)==g.source(f)&&
    1.99 +	    g.target(e)==g.target(f)) ||
   1.100 +      (g.source(e)==g.target(f)&&
   1.101 +       g.target(e)==g.source(f));
   1.102    }
   1.103    template<class TT>
   1.104    static std::string psOut(const xy<TT> &p) 
   1.105 @@ -583,7 +636,7 @@
   1.106    ///
   1.107    ///\sa nodePsTexts()
   1.108    GraphToEps<T> & nodePsTextsPreamble(const char *str) {
   1.109 -    _nodePsTextsPreamble=s ;return *this;
   1.110 +    _nodePsTextsPreamble=str ;return *this;
   1.111    }
   1.112    ///Sets whether the the graph is undirected
   1.113