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

  1. Rem * Title  : Using the RGB value
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ==========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 6
  6. rem ==========================================
  7. rem This program will use a rgb to draw lines
  8. rem ------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),0
  12.  
  13. rem Draw 100 lines 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 line
  19.  
  20.     rem Start of line
  21.     left=rnd(640)
  22.     top=rnd(480)
  23.  
  24.     rem End of line 
  25.     right=rnd(640)
  26.     bottom=rnd(480)
  27.  
  28.     rem Draw a line
  29.     line left,top,right,bottom
  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.