home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 20 / AACD20.BIN / AACD / Graphics / PerfectPaint / rexx / bridge / CropPic.rx < prev    next >
Text File  |  2000-12-23  |  776b  |  52 lines

  1. /*     arexx Script 
  2.     Crop Anim
  3. */
  4.  
  5.     options results
  6.     parse ARG Port CropX CropY CropW CropH 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=CropW/2
  25.     Y2=CropH/2    
  26.  
  27.     pp_CountFrames
  28.     nb=result
  29.     if nb>1 then do
  30.         Do i=1 to nb
  31.             pp_GotoFrame i
  32.             pp_PickBrush CropX CropY CropW CropH
  33.             pp_Bsave 'PerfectPaint:Temp/Anim'||i 0 1
  34.         END
  35.  
  36.         pp_New CropW CropH
  37.         pp_MakeAnim nb 0
  38.         do i=1 to nb
  39.             pp_Bload 'PerfectPaint:Temp/Anim'||i
  40.             pp_Plot X2 Y2        
  41.             pp_NextFrame
  42.         END
  43.         pp_FreeBrush
  44.         IF IsBrush=1 then DO
  45.             pp_Bload "perfectpaint:Temp/brush"
  46.         END
  47.         
  48.         ADDRESS COMMAND    'delete >nil: PerfectPaint:Temp/?#.*'
  49.         EXIT
  50.     END
  51.  
  52.