Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Graf::rysuj(int i, Graf tab[]){
- ofstream plik("graf.eps");
- plik << "%!PS-Adobe-2.0 EPSF-2.0" << endl;
- plik << "%%BoundingBox: 0 0 550 500" << endl;
- plik << "/Times-Roman findfont 20 scalefont setfont" << endl;
- //rysowanie punktow
- for (int j = 0; j < i; j++){
- plik << "newpath" << endl;
- plik << tab[j].x << ' ' << tab[j].y << " 5 0 360 arc closepath" << endl;
- plik << "fill" << endl;
- }
- polacz(plik, tab, i);
- plik << "0 0 1 setrgbcolor" << endl;
- //etykiety
- for (int j = 0; j < i; j++){
- plik << tab[j].x + 4 << ' ' << tab[j].y + 4 << " moveto" << endl;
- plik << '(' << j + 1 << ") show" << endl;
- }
- plik.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement