home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / devtools / files / lb202win.exe / LB202W.EXE / ELLIPSES.BAS < prev    next >
Encoding:
BASIC Source File  |  2000-12-06  |  707 b   |  31 lines

  1.  
  2.     ' draw some ellipses
  3.  
  4.     nomainwin
  5.  
  6.     colorPool$ = "red green blue"
  7.     open "Ellipses" for graphics as #1
  8.         print #1, "trapclose [quit]"
  9.         print #1, "down"
  10.         print #1, "place 130 130"
  11.         for x = 30 to 230 step 10
  12.             gosub [nextColor]
  13.             print #1, "ellipse "; x ; " "; 260 - x
  14.         next x
  15.         print #1, "flush"
  16.         wait
  17.  
  18. [nextColor]   'pick the next in the cycle of colors
  19.     while color$ = ""
  20.         colorIndex = colorIndex + 1
  21.         color$ = word$(colorPool$, colorIndex)
  22.         if color$ = "" then colorIndex = 0
  23.     wend
  24.     print #1, "color "; color$
  25.     color$ = ""
  26.     return
  27.  
  28. [quit]
  29.     close #1
  30.     end
  31.