home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / grafica / perfectpaint / rexx / ellipse / animpainting_ellipse.rx next >
Encoding:
Text File  |  1999-04-07  |  704 b   |  46 lines

  1. /* Script Rexx
  2.     AnimPainting for Ellipse*/
  3.  
  4.     call addlib("rexxmathlib.library", 5, -30, 0)
  5.  
  6.     options results
  7.   parse ARG Port x1 y1 r r2 b
  8.     ADDRESS value Port
  9.  
  10.     pp_DialogInit 250 60 "*AnimPainting*Ellipse*" 1
  11.         pp_Cycle 0 100 8 100 16 "Order" 1 "--->|<---" 0
  12.     pp_Dialog
  13.     rc=result
  14.     if rc=0 then
  15.         do
  16.             EXIT
  17.         end        
  18.  
  19.     pp_GetDialog 0
  20.     sens=result
  21.  
  22.     pp_CountFrames
  23.     nb=result
  24.     IF nb<2 then DO
  25.         pp_Warn 'Make*an*Anim*first.'
  26.         EXIT
  27.     END    
  28.  
  29.     Pi=3.1415926/180
  30.  
  31.     if sens=0 then DO
  32.       DO i=359 To 0 by -1
  33.         x = Sin(i*Pi)*r+x1
  34.       y = Cos(i*Pi)*r2+y1
  35.             pp_Plot x y
  36.             pp_NextFrame
  37.     END
  38.     END
  39.     ELSE
  40.       DO i=0 To 359
  41.       x = Sin(i*Pi)*r+x1
  42.       y = Cos(i*Pi)*r2+y1
  43.             pp_Plot x y
  44.             pp_NextFrame
  45.          END
  46.