Advertisement
Gralls

Untitled

Apr 1st, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. void Graf::rysuj(int i, Graf tab[]){
  2.     ofstream plik("graf.eps");
  3.     plik << "%!PS-Adobe-2.0 EPSF-2.0" << endl;
  4.     plik << "%%BoundingBox: 0 0 550 500" << endl;
  5.     plik << "/Times-Roman findfont 20 scalefont setfont" << endl;
  6.     //rysowanie punktow
  7.     for (int j = 0; j < i; j++){
  8.         plik << "newpath" << endl;
  9.         plik << tab[j].x << ' ' << tab[j].y << " 5 0 360 arc closepath" << endl;
  10.         plik << "fill" << endl;
  11.     }
  12.     polacz(plik, tab, i);
  13.     plik << "0 0 1 setrgbcolor" << endl;
  14.     //etykiety
  15.     for (int j = 0; j < i; j++){
  16.         plik << tab[j].x + 4 << ' ' << tab[j].y + 4 << " moveto" << endl;
  17.         plik << '(' << j + 1 << ") show" << endl;
  18.     }
  19.     plik.close();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement