home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / graphic / painting / arteffectdemo / macros / macros.lzh / effects / Wave < prev   
Encoding:
Text File  |  1995-05-15  |  917 b   |  47 lines

  1. /* Verzerrung 2
  2.  * von A. Pratsch
  3.  * Copyright (c) 1995
  4.  */
  5.  
  6. options results
  7.  
  8. activatewindow current
  9. source = result
  10.  
  11. getinfo stem a.
  12.  
  13. new a.picwidth a.picheight "Destination"
  14. dest = result
  15. movewindow l a.leftedge t a.topedge
  16.  
  17. activatewindow winid source quiet
  18. scalemode linear
  19. paintmode mat
  20.  
  21. width = random(1,a.picwidth)
  22. diff = random(0,2)-1
  23. fac = random(1,10)/100+1
  24. times = random(1,10)
  25. do y=0 to a.picheight-1
  26.     activatewindow winid source quiet
  27.     cutbox 0 y a.picwidth 1
  28.     sethandle tle
  29.     activatewindow winid dest quiet
  30.     if times > 0 then times=times-1
  31.     else do
  32.         diff = random(0,4)-2
  33.         times = random(1,10)
  34.     end
  35.     if (width + diff) > a.picwidth then diff = -diff
  36.   if (width - diff) > a.picwidth then diff = -diff
  37.     if (width + diff) < 0 then diff = -diff
  38.   if (width - diff) < 0 then diff = -diff
  39.     width = width + diff
  40.     diff = diff*fac
  41.     resizebrush w trunc(width)
  42.     point 0 y
  43. end
  44. freebrush
  45.  
  46. activatewindow winid dest
  47.