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 >
Wrap
C/C++ Source or Header
|
1992-09-14
|
826b
|
50 lines
#include <conio.h>
#include <wgt.h>
/* WORDUP Graphics Toolkit Version 3.0
Demonstration program 27
Draws some circles, captures a block,
and skews the block while rotating the colours.
*/
block skewit;
int i=0;
color palette[256];
void main(void)
{
vga256(); // initializes system
wreadpalette(0,255,&palette);
wcls(0);
for (i=100; i>0; i--)
{
wsetcolor(i);
wfill_circle(160,100,i);
}
wsetcolor(0);
wbar(0,0,104,199);
wbar(216,0,319,199);
skewit=wnewblock(100,40,220,160);
wcls(0);
do {
for (i=-100; i<100; i+=2)
{
wskew(100,40,skewit,i);
wcolrotate(1,100,0,&palette);
}
for (i=100; i>-100; i-=2)
{
wskew(100,40,skewit,i);
wcolrotate(1,100,0,&palette);
}
} while (!kbhit());
getch();
textmode(C80); // used to return to text mode
}