home *** CD-ROM | disk | FTP | other *** search
- /*
- * EOT_Rotate.ifx
- * Written by Thomas Krehbiel
- *
- * 2D Rotation.
- *
- * Inputs:
- * Word(Arg(1),1) = Frame number (1 - N)
- * Word(Arg(1),2) = Main filename ("-" if not specified)
- * Word(Arg(1),3) = Swap filename ("-" if not specified)
- * Word(Arg(1),4) = Sequence number (?)
- * Word(Arg(1),5) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- framenum = Word(Arg(1),1)
- mainname = Word(Arg(1),2)
- swapname = Word(Arg(1),3)
- seqnum = Word(Arg(1),4)
- framemax = Word(Arg(1),5)
-
- base = 'Autofx_Rotate_'
-
- x1 = GETCLIP(base||'x1')
- y1 = GETCLIP(base||'y1')
- a1 = GETCLIP(base||'a1')
- a2 = GETCLIP(base||'a2')
-
- GetMain
- IF rc ~= 0 THEN EXIT rc
- PARSE VAR result name width height .
-
- IF x1 = -1 THEN x1 = width%2
- IF y1 = -1 THEN y1 = height%2
-
- /* linear interpolation */
- a = a1 + ((a2 - a1 + 1) * (framenum-1) % (framemax))
-
- Hook Rotate a CenterX x1 CenterY y1 AntiAlias
- EXIT rc
-