Changeset 210:81cfc04531e8 in lemon for lemon/graph_to_eps.h
 Timestamp:
 07/13/08 21:09:47 (12 years ago)
 Branch:
 default
 Children:
 211:542dd614cbb4, 212:1ae84dea7d09, 214:60eecd3fe37a, 216:6d7bfcf5b48e
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/graph_to_eps.h
r209 r210 143 143 ///\param _g Reference to the graph to be printed. 144 144 ///\param _os Reference to the output stream. 145 ///\param _os Reference to the output stream. By default it is <tt>std::cout</tt>. 145 ///\param _os Reference to the output stream. 146 ///By default it is <tt>std::cout</tt>. 146 147 ///\param _pros If it is \c true, then the \c ostream referenced by \c _os 147 148 ///will be explicitly deallocated by the destructor. … … 782 783 os << "/lb { setlinewidth setrgbcolor newpath moveto\n" 783 784 << " 4 2 roll 1 index 1 index curveto stroke } bind def\n"; 784 os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def\n"; 785 os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke }" 786 << " bind def\n"; 785 787 //x y r 786 os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def\n"; 788 os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath }" 789 << " bind def\n"; 787 790 //x y r 788 791 os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n" … … 812 815 << " newpath 5 index 5 index moveto " 813 816 << "5 index 5 index 5 index 3.01 mul sub\n" 814 << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto\n" 815 << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke\n" 817 << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub" 818 << " moveto\n" 819 << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto " 820 << "stroke\n" 816 821 << " 5 index 5 index 5 index c fill\n" 817 822 << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n" … … 827 832 << " 1 index 1 index 7 index sub moveto\n" 828 833 << " 1 index 1 index lineto\n" 829 << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto\n" 834 << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub" 835 << " lineto\n" 830 836 << " stroke\n" 831 837 << " 5 index 5 index 5 index c fill\n" … … 839 845 os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n"; 840 846 //len w dx_norm dy_norm x1 y1 cr cg cb 841 os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def\n" 847 os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx " 848 << "exch def\n" 842 849 << " /w exch def /len exch def\n" 843 // << "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"850 //<< "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke" 844 851 << " newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto\n" 845 852 << " len w sub arrl sub dx dy lrl\n" … … 903 910 dim2::Point<double> d(dvec/std::max(l,EPSILON)); 904 911 dim2::Point<double> m; 905 // m=dim2::Point<double>(mycoords[g.target(*i)]+mycoords[g.source(*i)])/2.0; 912 // m=dim2::Point<double>(mycoords[g.target(*i)]+ 913 // mycoords[g.source(*i)])/2.0; 906 914 907 915 // m=dim2::Point<double>(mycoords[g.source(*i)])+ … … 939 947 // t1=0;t2=1; 940 948 // for(int i=0;i<INTERPOL_PREC;++i) 941 // if(isInsideNode(bez((t1+t2)/2)t,rn,node_shape)) t1=(t1+t2)/2; 949 // if(isInsideNode(bez((t1+t2)/2)t,rn,node_shape)) 950 // t1=(t1+t2)/2; 942 951 // else t2=(t1+t2)/2; 943 952 // bez=bez.after((t1+t2)/2);
Note: See TracChangeset
for help on using the changeset viewer.