home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / w / wgt3_ex.zip / WGT27.C < prev    next >
C/C++ Source or Header  |  1992-09-14  |  826b  |  50 lines

  1. #include <conio.h>
  2. #include <wgt.h>
  3.  
  4. /*   WORDUP Graphics Toolkit   Version 3.0
  5.      Demonstration program 27
  6.  
  7. Draws some circles, captures a block,
  8. and skews the block while rotating the colours.
  9.  
  10. */
  11.  
  12. block skewit;
  13. int i=0;
  14. color palette[256];
  15.  
  16. void main(void)
  17. {
  18. vga256();        // initializes system
  19.  
  20. wreadpalette(0,255,&palette);
  21.  
  22. wcls(0);
  23. for (i=100; i>0; i--)
  24.   {
  25.   wsetcolor(i);
  26.   wfill_circle(160,100,i);
  27.   }
  28.  
  29. wsetcolor(0);
  30. wbar(0,0,104,199);
  31. wbar(216,0,319,199);
  32. skewit=wnewblock(100,40,220,160);
  33.  
  34. wcls(0);
  35. do {
  36. for (i=-100; i<100; i+=2)
  37.   {
  38.   wskew(100,40,skewit,i);
  39.   wcolrotate(1,100,0,&palette);
  40.   }
  41. for (i=100; i>-100; i-=2)
  42.   {
  43.   wskew(100,40,skewit,i);
  44.   wcolrotate(1,100,0,&palette);
  45.   }
  46. } while (!kbhit());
  47.  
  48. getch();
  49. textmode(C80);        // used to return to text mode
  50. }