Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #include <math.h>
  2. #include <iostream>
  3. #include "graphics.h"
  4.  
  5. void draw_menu(void)
  6. {
  7. int x;
  8. for (x=0;x<256;x++) { setcolor(COLOR(x,255,0)); line(x,0,x,30);}
  9. for (x=0;x<256;x++) { setcolor(COLOR(255,255-x,0)); line(255+x,0,255+x,30);}
  10. for (x=0;x<256;x++) { setcolor(COLOR(255,0,x)); line(510+x,0,510+x,30);}
  11. for (x=0;x<256;x++) { setcolor(COLOR(0,255,255-x)); line(255-x,30,255-x,60);}
  12. for (x=0;x<256;x++) { setcolor(COLOR(0,x,255)); line(510-x,30,510-x,60); }
  13. for (x=0;x<256;x++) { setcolor(COLOR(255-x,0,255)); line(765-x,30,765-x,60);}
  14.  
  15. setcolor(COLOR(255,255,255));
  16. outtextxy(5,600,"f - wybór koloru rysowania");
  17. outtextxy(5,615,"b - wybór koloru wypelniania");
  18. outtextxy(5,630,"l - rysowanie linii");
  19.  
  20. outtextxy(200,600,"r - rysowanie prostokata");
  21. outtextxy(200,615,"a - rysowanie wype³nionego prostokata");
  22. outtextxy(200,630,"c - rysowanie okrêgu");
  23.  
  24. outtextxy(470,600,"w - zapis do pliku");
  25. outtextxy(470,615,"o - odczyt z pliku");
  26. outtextxy(470,630,"esc - wyjscie");
  27.  
  28. outtextxy(650,615,"Aktualne:");
  29.  
  30. setcolor(COLOR(255,255,255));
  31. rectangle(1,62,798,598);
  32. }
  33.  
  34. int main( )
  35. {
  36. draw_menu();
  37. return( 0 );
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement