- Nodes are drawn in a better way
authoralpar
Wed, 19 Jan 2005 20:19:31 +0000
changeset 1089c0f4ebdc0034
parent 1088 358526a620f8
child 1090 9e9195331ea6
- Nodes are drawn in a better way
- Arrowheads made more similar in parallel vs. non-parallel modes.
src/lemon/graph_to_eps.h
     1.1 --- a/src/lemon/graph_to_eps.h	Wed Jan 19 12:17:11 2005 +0000
     1.2 +++ b/src/lemon/graph_to_eps.h	Wed Jan 19 20:19:31 2005 +0000
     1.3 @@ -458,20 +458,14 @@
     1.4         << "      2 index             2 index 2 index sub lineto\n"
     1.5         << "      closepath pop pop pop} bind def\n";
     1.6      // x y r cr cg cb
     1.7 -    os << "/nc { setrgbcolor 2 index 2 index 2 index c fill\n"
     1.8 -       << "     0 0 0 setrgbcolor dup "
     1.9 -       << _nodeBorderQuotient << " mul setlinewidth "
    1.10 -       << 1+_nodeBorderQuotient/2 << " div c stroke\n"
    1.11 +    os << "/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill\n"
    1.12 +       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
    1.13         << "   } bind def\n";
    1.14 -    os << "/nsq { setrgbcolor 2 index 2 index 2 index sq fill\n"
    1.15 -       << "     0 0 0 setrgbcolor dup "
    1.16 -       << _nodeBorderQuotient << " mul setlinewidth "
    1.17 -       << 1+_nodeBorderQuotient/2 << " div sq stroke\n"
    1.18 +    os << "/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill\n"
    1.19 +       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div sq fill\n"
    1.20         << "   } bind def\n";
    1.21 -    os << "/ndi { setrgbcolor 2 index 2 index 2 index di fill\n"
    1.22 -       << "     0 0 0 setrgbcolor dup "
    1.23 -       << _nodeBorderQuotient << " mul setlinewidth "
    1.24 -       << 1+_nodeBorderQuotient/2 << " div di stroke\n"
    1.25 +    os << "/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill\n"
    1.26 +       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div di fill\n"
    1.27         << "   } bind def\n";
    1.28      os << "/arrl " << _arrowLength << " def\n";
    1.29      os << "/arrw " << _arrowWidth << " def\n";
    1.30 @@ -566,7 +560,7 @@
    1.31  		 << bez.p3.x << ' ' << bez.p3.y << ' '
    1.32  		 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
    1.33  	      xy<double> dd(rot(linend-apoint));
    1.34 -	      dd*=(_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
    1.35 +	      dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
    1.36  		sqrt(dd.normSquare());
    1.37  	      os << "newpath " << psOut(apoint) << " moveto "
    1.38  		 << psOut(linend+dd) << " lineto "