[Lemon-commits] Alpar Juttner: Scale the node sizes and arc widt...

Lemon HG hg at lemon.cs.elte.hu
Thu Apr 17 18:22:47 CEST 2008


details:   http://lemon.cs.elte.hu/hg/lemon/rev/50ff949140fa
changeset: 132:50ff949140fa
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Mon Apr 14 11:23:56 2008 +0100
description:
	Scale the node sizes and arc widths in a more sensible way

diffstat:

2 files changed, 5 insertions(+), 5 deletions(-)
demo/graph_to_eps_demo.cc |    2 +-
lemon/graph_to_eps.h      |    8 ++++----

diffs (46 lines):

diff -r 3125084667a3 -r 50ff949140fa demo/graph_to_eps_demo.cc
--- a/demo/graph_to_eps_demo.cc	Tue Apr 15 08:56:55 2008 +0100
+++ b/demo/graph_to_eps_demo.cc	Mon Apr 14 11:23:56 2008 +0100
@@ -199,7 +199,7 @@
     copyright("(C) 2003-2007 LEMON Project").
     coords(hcoords).
     absoluteNodeSizes().absoluteArcWidths().
-    nodeScale(45).
+    nodeScale(.45).
     distantColorNodeTexts().
     //    distantBWNodeTexts().
     nodeTexts(hcolors).nodeTextSize(.6).
diff -r 3125084667a3 -r 50ff949140fa lemon/graph_to_eps.h
--- a/lemon/graph_to_eps.h	Tue Apr 15 08:56:55 2008 +0100
+++ b/lemon/graph_to_eps.h	Mon Apr 14 11:23:56 2008 +0100
@@ -150,10 +150,10 @@
   DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout,
 			  bool _pros=false) :
     g(_g), os(_os),
-    _coords(dim2::Point<double>(1,1)), _nodeSizes(.01), _nodeShapes(0),
+    _coords(dim2::Point<double>(1,1)), _nodeSizes(1), _nodeShapes(0),
     _nodeColors(WHITE), _arcColors(BLACK),
     _arcWidths(1.0), _arcWidthScale(0.003),
-    _nodeScale(1.0), _xBorder(10), _yBorder(10), _scale(1.0),
+    _nodeScale(.01), _xBorder(10), _yBorder(10), _scale(1.0),
     _nodeBorderQuotient(.1),
     _drawArrows(false), _arrowLength(1), _arrowWidth(0.3),
     _showNodes(true), _showArcs(true),
@@ -496,7 +496,7 @@
   /// equal to \c d.
   /// \sa nodeSizes()
   /// \sa autoNodeScale()
-  GraphToEps<T> &nodeScale(double d) {_nodeScale=d;return *this;}
+  GraphToEps<T> &nodeScale(double d=.01) {_nodeScale=d;return *this;}
   ///Turns on/off the automatic node width scaling.
 
   ///Turns on/off the automatic node width scaling.
@@ -549,7 +549,7 @@
   /// If both arcWidths() and autoArcWidthScale() are used, then the
   /// arc withs will be scaled in such a way that the greatest width will be
   /// equal to \c d.
-  GraphToEps<T> &arcWidthScale(double d) {_arcWidthScale=d;return *this;}
+  GraphToEps<T> &arcWidthScale(double d=.003) {_arcWidthScale=d;return *this;}
   ///Turns on/off the automatic arc width scaling.
 
   ///Turns on/off the automatic arc width scaling.



More information about the Lemon-commits mailing list