home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m130 / 1.ddi / RESOURCE.001 / RAYS.POC < prev    next >
Encoding:
Text File  |  1990-08-02  |  416 b   |  34 lines

  1. // rays - wait for pen click then draw lines connecting the initial point to 
  2. // point where pen is down.
  3.  
  4. do_rays(int xc,int yc)
  5. {;
  6. int x,y;
  7. int l,r,k;
  8. for (;;)
  9.     {
  10.     if (!RubLine(xc,yc,&x,&y))
  11.         break;
  12.     do
  13.         {
  14.         Line(xc,yc,x,y);
  15.         PollInput(&x,&y,&l,&r,&k);
  16.         }
  17.     while (l);
  18.     }
  19. }
  20.  
  21. main()
  22. {
  23. int x,y,l,r,k;
  24.  
  25. for (;;)
  26. {
  27. WaitClick(&x,&y,&l,&r,&k);
  28. if (!l)
  29.     break;
  30. else
  31.     do_rays(x,y);
  32. }
  33. }
  34.