home *** CD-ROM | disk | FTP | other *** search
/ Amiga Computing 64 / ac064.adf / Rexx / Stars.ifx < prev   
Text File  |  1978-01-13  |  633b  |  46 lines

  1. /*
  2.  * $VER: Stars 1.00.00 (24.9.92)
  3.  *
  4.  * Arexx program for the ImageFX image processing system.
  5.  * Written by Thomas Krehbiel
  6.  *
  7.  * Draws a lot of random stars into the current buffer.
  8.  *
  9.  */
  10.  
  11. OPTIONS RESULTS
  12.  
  13. GetMain
  14. IF result = "" THEN DO
  15.    CreateBuffer 320 200 Force
  16.    GetMain
  17.    END
  18.  
  19. IF result = "" THEN EXIT
  20.  
  21. PARSE VAR result name width height depth
  22.  
  23. SaveUndo ; Undo Off ; Redraw Off
  24.  
  25. BeginBar 'Stars' 500
  26.  
  27. DO i = 1 TO 500
  28.  
  29.    Bar i
  30.    LockGui
  31.    x = random(0,width-1)
  32.    y = random(0,height-1)
  33.    g = random(0,128) + 10
  34.    SetPalette '-1' g g g
  35.    Point x y
  36.    UnlockGui
  37.  
  38.    END
  39.  
  40. EndBar
  41.  
  42. Undo On ; Redraw On ; Redraw
  43.  
  44. EXIT
  45.  
  46.