home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / HISPEED1.ZIP / GRAFDEMO / RANLINES.PAS < prev   
Pascal/Delphi Source File  |  1991-07-02  |  652b  |  31 lines

  1. Program RanLines;
  2.  
  3. Uses EasyGraf;
  4.   
  5. { Filename: RanLines.pas      }
  6. { Coder   : Jacob V. Pedersen }
  7. { Coded   : 1-8-1990          }
  8. { Purpose : Example           }
  9.  
  10. { The mouse is not shown if you enter .TOS in the OPTIONS/Linker dialog }
  11.  
  12. Procedure Make_Lines;
  13. Const Extra=-20;
  14. Begin
  15.   Repeat
  16.     LineColor(Random(MaxColor+1));
  17.     Line( Random(MaxX+Extra*2)-Extra,
  18.           Random(MaxY+Extra*2)-Extra,
  19.           Random(MaxX+Extra*2)-Extra,
  20.           Random(MaxY+Extra*2)-Extra);
  21.   Until (KeyPressed);
  22. End; { Make_Lines }
  23.  
  24. BEGIN { main }
  25.   Randomize;
  26.   InitGraphics;
  27.   ClearDevice;
  28.   Make_Lines;
  29.   DeInitGraphics;
  30. END.
  31.