home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation Festival
/
animationfestival1994.iso
/
dosrun
/
dosrun2
/
resource
/
rays.poc
< prev
next >
Wrap
Text File
|
1990-08-03
|
416b
|
34 lines
// rays - wait for pen click then draw lines connecting the initial point to
// point where pen is down.
do_rays(int xc,int yc)
{;
int x,y;
int l,r,k;
for (;;)
{
if (!RubLine(xc,yc,&x,&y))
break;
do
{
Line(xc,yc,x,y);
PollInput(&x,&y,&l,&r,&k);
}
while (l);
}
}
main()
{
int x,y,l,r,k;
for (;;)
{
WaitClick(&x,&y,&l,&r,&k);
if (!l)
break;
else
do_rays(x,y);
}
}