home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Graphics / PerfectPaint / rexx / bridge / ScalePic.rx < prev    next >
Text File  |  2000-04-09  |  825b  |  54 lines

  1. /*     arexx Script 
  2.     Scale Anim
  3. */
  4.  
  5.     options results
  6.     parse ARG Port Width Height Mode b
  7.     
  8.     ADDRESS value Port
  9.     pp_AvoidRefresh
  10.  
  11.     pp_GetWidth
  12.     W=result
  13.     pp_GetHeight
  14.     H=result
  15.  
  16.     pp_GetWidthB
  17.     Wb=result
  18.     IsBrush=0
  19.     IF Wb>0 then DO
  20.         IsBrush=1
  21.         pp_Bsave "perfectpaint:Temp/brush" 0 3
  22.     END
  23.  
  24.     X2=Width/2
  25.     Y2=Height/2    
  26.  
  27.     pp_CountFrames
  28.     nb=result
  29.     IsAnim=0
  30.     if nb>1 then do
  31.         pp_SavePrefs 0 1 100 0 0
  32.         IsAnim=1
  33.         Do i=1 to nb
  34.             pp_GotoFrame i
  35.             pp_Save 'PerfectPaint:Temp/Anim'||i 0
  36.         END
  37.         pp_New Width Height
  38.         pp_MakeAnim nb 0
  39.         do i=1 to nb
  40.             pp_Bload 'PerfectPaint:Temp/Anim'||i
  41.             pp_ScaleBrush Width Height
  42.             pp_Plot X2 Y2        
  43.             pp_NextFrame
  44.         END
  45.         pp_FreeBrush
  46.         IF IsBrush=1 then DO
  47.             pp_Bload "perfectpaint:Temp/brush"
  48.         END        
  49.         pp_PermitRefresh
  50.         ADDRESS COMMAND    'delete >nil: PerfectPaint:Temp/?#.*'
  51.         EXIT
  52.     END
  53.  
  54.