Changeset 1930:92b70deed0c5 in lemon-0.x
- Timestamp:
- 01/30/06 10:37:41 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2505
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r1875 r1930 80 80 81 81 cout << "Create 'graph_to_eps_demo_out.eps'" << endl; 82 graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords). 82 graphToEps(g,"graph_to_eps_demo_out.eps"). 83 //scale(10). 84 coords(coords). 83 85 title("Sample .eps figure"). 84 86 copyright("(C) 2006 LEMON Project"). … … 93 95 94 96 cout << "Create 'graph_to_eps_demo_out_arr.eps'" << endl; 95 graphToEps(g,"graph_to_eps_demo_out_arr.eps").scale(10). 97 graphToEps(g,"graph_to_eps_demo_out_arr.eps"). 98 //scale(10). 96 99 title("Sample .eps figure (with arrowheads)"). 97 100 copyright("(C) 2006 LEMON Project"). … … 118 121 119 122 cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl; 120 graphToEps(g,"graph_to_eps_demo_out_par.eps").scale(10). 123 graphToEps(g,"graph_to_eps_demo_out_par.eps"). 124 //scale(10). 121 125 title("Sample .eps figure (parallel edges)"). 122 126 copyright("(C) 2006 LEMON Project"). … … 132 136 133 137 cout << "Create 'graph_to_eps_demo_out_par_arr.eps'" << endl; 134 graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").scale(10). 138 graphToEps(g,"graph_to_eps_demo_out_par_arr.eps"). 139 //scale(10). 135 140 title("Sample .eps figure (parallel edges and arrowheads)"). 136 141 copyright("(C) 2006 LEMON Project"). … … 173 178 174 179 cout << "Create 'graph_to_eps_demo_out_colors.eps'" << endl; 175 graphToEps(h,"graph_to_eps_demo_out_colors.eps").scale(60). 180 graphToEps(h,"graph_to_eps_demo_out_colors.eps"). 181 //scale(60). 176 182 title("Sample .eps figure (ColorSet demo)"). 177 183 copyright("(C) 2006 LEMON Project"). -
lemon/graph_to_eps.h
r1910 r1930 852 852 if(_scaleToA4) 853 853 os <<"%%BoundingBox: 0 0 596 842\n%%DocumentPaperSizes: a4\n"; 854 else os << "%%BoundingBox: " 855 << bb.left() * _scale - _xBorder << ' ' 856 << bb.bottom() * _scale - _yBorder << ' ' 857 << bb.right() * _scale + _xBorder << ' ' 858 << bb.top() * _scale + _yBorder << '\n'; 854 else { 855 //Rescale so that BoundingBox won't be neither to big nor too small. 856 while(bb.height()*_scale>1000||bb.width()*_scale>1000) _scale/=10; 857 while(bb.height()*_scale<100||bb.width()*_scale<100) _scale*=10; 858 859 os << "%%BoundingBox: " 860 << int(floor(bb.left() * _scale - _xBorder)) << ' ' 861 << int(floor(bb.bottom() * _scale - _yBorder)) << ' ' 862 << int(ceil(bb.right() * _scale + _xBorder)) << ' ' 863 << int(ceil(bb.top() * _scale + _yBorder)) << '\n'; 864 } 859 865 860 866 os << "%%EndComments\n";
Note: See TracChangeset
for help on using the changeset viewer.