home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
circle
/
AnimPainting_Whirl.rx
< prev
next >
Wrap
Text File
|
1999-12-09
|
1KB
|
95 lines
/* Script Rexx
AnimPainting for Circle
Whirl Effect*/
call addlib("rexxmathlib.library", 5, -30, 0)
options results
parse ARG Port x1 y1 r b
ADDRESS COMMAND
sens=0
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/AnimPainting_Whirl') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/AnimPainting_Whirl', "R") then DO
sens = READLN('lfile')
CALL CLOSE('lfile')
END
END
ADDRESS value Port
pp_CountFrames
nb=result
IF nb<2 then DO
pp_Warn 'Make*an*Anim*first.'
EXIT
END
Pi=3.1415926/180
rr=r/360
r2=r
r=0
pp_DialogInit 250 60 "*AnimPainting*Whirl*" 1
pp_Cycle 0 100 8 100 16 "Order" 1 "--->|<---" sens
pp_Dialog
rc=result
if rc=0 then
do
EXIT
end
pp_GetDialog 0
sens=result
CALL SavePrefs('AnimPainting_Whirl',sens)
ADDRESS value Port
if sens=0 then DO
DO i=600 To 0 by -1
x = Sin(i*Pi)*r+x1
y = Cos(i*Pi)*r+y1
pp_Plot x y
pp_NextFrame
if r<r2 then DO
r=r+rr
END
END
END
ELSE
DO i=0 To 600
x = Sin(i*Pi)*r+x1
y = Cos(i*Pi)*r+y1
pp_Plot x y
pp_NextFrame
if r<r2 then DO
r=r+rr
END
END
EXIT
SavePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN