home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / 2d / exam05.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  1001 b   |  43 lines

  1. Rem * Title  : Draw An Ellipse
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ==========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 5
  6. rem ==========================================
  7. rem This program will draw a ellipse on screen
  8. rem ------------------------------------------
  9.  
  10. rem Set the ink to red and paper color to black 
  11. ink rgb(244,0,0),0
  12.  
  13. rem Draw 1000 ellipses to the screen
  14. for t=0 to 1000 
  15.     rem Get a random ink color
  16.     ink rgb(rnd(255),rnd(255),rnd(255)),1
  17.     
  18.     rem where on screen to draw ellipse
  19.     left=rnd(640)
  20.     top=rnd(480)
  21.  
  22.     rem Width of ellipse
  23.     ellipsewidth=rnd(100)
  24.     
  25.     rem Height of ellipse
  26.     ellipseheight=rnd(100)
  27.  
  28.     rem Draw a ellipse
  29.     ellipse left,top,ellipsewidth,ellipseheight
  30. next t
  31.  
  32. rem Set the ink to white and paper color to black 
  33. ink rgb(244,214,210),1
  34.  
  35. rem Print a message on screen
  36. text 200,240,"press the spacebar to quit"
  37.  
  38. rem Will wait for you to press any key
  39. suspend for key
  40.  
  41. rem End the program
  42. end
  43.