COIN-OR::LEMON - Graph Library

Changeset 2379:248152674a9e in lemon-0.x


Ignore:
Timestamp:
03/01/07 17:03:36 (12 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3209
Message:

Prescaling can be turned off

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_to_eps.h

    r2207 r2379  
    135135
    136136  bool _negY;
     137
     138  bool _preScale;
    137139  ///Constructor
    138140
     
    164166    _absoluteNodeSizes(false),
    165167    _absoluteEdgeWidths(false),
    166     _negY(false)
     168    _negY(false),
     169    _preScale(true)
    167170  {}
    168171};
     
    240243
    241244  using T::_negY;
     245  using T::_preScale;
    242246
    243247  // dradnats ++C eht yb deriuqer si ti eveileb t'naC
     
    522526  }
    523527
     528  ///Turns on/off prescaling
     529
     530  ///Turns on/off prescaling
     531  ///
     532  ///\todo More docs.
     533  ///
     534  GraphToEps<T> &preScale(bool b=true) {
     535    _preScale=b;return *this;
     536  }
     537
    524538  ///Sets a global scale factor for edge widths
    525539
     
    777791      os <<"%%BoundingBox: 0 0 596 842\n%%DocumentPaperSizes: a4\n";
    778792    else {
    779       //Rescale so that BoundingBox won't be neither to big nor too small.
    780       while(bb.height()*_scale>1000||bb.width()*_scale>1000) _scale/=10;
    781       while(bb.height()*_scale<100||bb.width()*_scale<100) _scale*=10;
    782    
     793      if(_preScale) {
     794        //Rescale so that BoundingBox won't be neither to big nor too small.
     795        while(bb.height()*_scale>1000||bb.width()*_scale>1000) _scale/=10;
     796        while(bb.height()*_scale<100||bb.width()*_scale<100) _scale*=10;
     797      }
     798     
    783799      os << "%%BoundingBox: "
    784800         << int(floor(bb.left()   * _scale - _xBorder)) << ' '
Note: See TracChangeset for help on using the changeset viewer.