[Lemon-commits] [lemon_svn] alpar: r1485 - hugo/trunk/src/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:45:48 CET 2006


Author: alpar
Date: Wed Jan 19 21:19:31 2005
New Revision: 1485

Modified:
   hugo/trunk/src/lemon/graph_to_eps.h

Log:
- Nodes are drawn in a better way
- Arrowheads made more similar in parallel vs. non-parallel modes.

Modified: hugo/trunk/src/lemon/graph_to_eps.h
==============================================================================
--- hugo/trunk/src/lemon/graph_to_eps.h	(original)
+++ hugo/trunk/src/lemon/graph_to_eps.h	Wed Jan 19 21:19:31 2005
@@ -458,20 +458,14 @@
        << "      2 index             2 index 2 index sub lineto\n"
        << "      closepath pop pop pop} bind def\n";
     // x y r cr cg cb
-    os << "/nc { setrgbcolor 2 index 2 index 2 index c fill\n"
-       << "     0 0 0 setrgbcolor dup "
-       << _nodeBorderQuotient << " mul setlinewidth "
-       << 1+_nodeBorderQuotient/2 << " div c stroke\n"
+    os << "/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill\n"
+       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
        << "   } bind def\n";
-    os << "/nsq { setrgbcolor 2 index 2 index 2 index sq fill\n"
-       << "     0 0 0 setrgbcolor dup "
-       << _nodeBorderQuotient << " mul setlinewidth "
-       << 1+_nodeBorderQuotient/2 << " div sq stroke\n"
+    os << "/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill\n"
+       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div sq fill\n"
        << "   } bind def\n";
-    os << "/ndi { setrgbcolor 2 index 2 index 2 index di fill\n"
-       << "     0 0 0 setrgbcolor dup "
-       << _nodeBorderQuotient << " mul setlinewidth "
-       << 1+_nodeBorderQuotient/2 << " div di stroke\n"
+    os << "/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill\n"
+       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div di fill\n"
        << "   } bind def\n";
     os << "/arrl " << _arrowLength << " def\n";
     os << "/arrw " << _arrowWidth << " def\n";
@@ -566,7 +560,7 @@
 		 << bez.p3.x << ' ' << bez.p3.y << ' '
 		 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
 	      xy<double> dd(rot(linend-apoint));
-	      dd*=(_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
+	      dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
 		sqrt(dd.normSquare());
 	      os << "newpath " << psOut(apoint) << " moveto "
 		 << psOut(linend+dd) << " lineto "



More information about the Lemon-commits mailing list