lemon/graph_to_eps.h
changeset 991 a10624ed1997
parent 959 17e36e175725
parent 877 141f9c0db4a3
child 998 7fdaa05a69a1
equal deleted inserted replaced
32:83ce69f4ff00 33:e1f14d646452
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2009
     5  * Copyright (C) 2003-2010
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
   140   ///Constructor
   140   ///Constructor
   141 
   141 
   142   ///Constructor
   142   ///Constructor
   143   ///\param gr  Reference to the graph to be printed.
   143   ///\param gr  Reference to the graph to be printed.
   144   ///\param ost Reference to the output stream.
   144   ///\param ost Reference to the output stream.
   145   ///By default it is <tt>std::cout</tt>.
   145   ///By default, it is <tt>std::cout</tt>.
   146   ///\param pros If it is \c true, then the \c ostream referenced by \c os
   146   ///\param pros If it is \c true, then the \c ostream referenced by \c os
   147   ///will be explicitly deallocated by the destructor.
   147   ///will be explicitly deallocated by the destructor.
   148   DefaultGraphToEpsTraits(const GR &gr, std::ostream& ost = std::cout,
   148   DefaultGraphToEpsTraits(const GR &gr, std::ostream& ost = std::cout,
   149                           bool pros = false) :
   149                           bool pros = false) :
   150     g(gr), os(ost),
   150     g(gr), os(ost),
   510     _negY=b;return *this;
   510     _negY=b;return *this;
   511   }
   511   }
   512 
   512 
   513   ///Turn on/off pre-scaling
   513   ///Turn on/off pre-scaling
   514 
   514 
   515   ///By default graphToEps() rescales the whole image in order to avoid
   515   ///By default, graphToEps() rescales the whole image in order to avoid
   516   ///very big or very small bounding boxes.
   516   ///very big or very small bounding boxes.
   517   ///
   517   ///
   518   ///This (p)rescaling can be turned off with this function.
   518   ///This (p)rescaling can be turned off with this function.
   519   ///
   519   ///
   520   GraphToEps<T> &preScale(bool b=true) {
   520   GraphToEps<T> &preScale(bool b=true) {
  1112 
  1112 
  1113 ///\ingroup eps_io
  1113 ///\ingroup eps_io
  1114 ///Generates an EPS file from a graph.
  1114 ///Generates an EPS file from a graph.
  1115 ///\param g Reference to the graph to be printed.
  1115 ///\param g Reference to the graph to be printed.
  1116 ///\param os Reference to the output stream.
  1116 ///\param os Reference to the output stream.
  1117 ///By default it is <tt>std::cout</tt>.
  1117 ///By default, it is <tt>std::cout</tt>.
  1118 ///
  1118 ///
  1119 ///This function also has a lot of
  1119 ///This function also has a lot of
  1120 ///\ref named-templ-func-param "named parameters",
  1120 ///\ref named-templ-func-param "named parameters",
  1121 ///they are declared as the members of class \ref GraphToEps. The following
  1121 ///they are declared as the members of class \ref GraphToEps. The following
  1122 ///example shows how to use these parameters.
  1122 ///example shows how to use these parameters.
  1124 /// graphToEps(g,os).scale(10).coords(coords)
  1124 /// graphToEps(g,os).scale(10).coords(coords)
  1125 ///              .nodeScale(2).nodeSizes(sizes)
  1125 ///              .nodeScale(2).nodeSizes(sizes)
  1126 ///              .arcWidthScale(.4).run();
  1126 ///              .arcWidthScale(.4).run();
  1127 ///\endcode
  1127 ///\endcode
  1128 ///
  1128 ///
  1129 ///For more detailed examples see the \ref graph_to_eps_demo.cc demo file.
  1129 ///For more detailed examples, see the \ref graph_to_eps_demo.cc demo file.
  1130 ///
  1130 ///
  1131 ///\warning Don't forget to put the \ref GraphToEps::run() "run()"
  1131 ///\warning Don't forget to put the \ref GraphToEps::run() "run()"
  1132 ///to the end of the parameter list.
  1132 ///to the end of the parameter list.
  1133 ///\sa GraphToEps
  1133 ///\sa GraphToEps
  1134 ///\sa graphToEps(GR &g, const char *file_name)
  1134 ///\sa graphToEps(GR &g, const char *file_name)