home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
text
/
Azzaro.rx
next >
Wrap
Text File
|
1999-12-23
|
1KB
|
117 lines
/*
Arexx Text Script
*/
options results
parse ARG Port x y b
ADDRESS value Port
pp_AvoidRefresh
F=0
ADDRESS COMMAND
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/Azzaro') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/Azzaro', "R") then DO
F = READLN('lfile')
CALL CLOSE('lfile')
END
END
ADDRESS value Port
pp_DialogInit 150 55 "*Azzaro*" 1
pp_Cycle 0 60 5 60 16 "Bg" 1 "Black|White" F
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_GetDialog 0
F=result
CALL SavePrefs('Azzaro',F)
ADDRESS value Port
pp_GetDepth
depth=result
pp_ComposeReqOff
pp_PicttoSpare
pp_GetHeightT
H=result
pp_GetWidthT
W=result
xx=x-W/2
yy=y-H/2
pp_ClosestColor 0 0 0
Black=result
pp_ClosestColor 255 255 255
White=result
pp_Compose 0 100 0
if depth=24 then DO
pp_UpdateUndoBox xx-15 yy-15 xx+W+33 yy+H+33
END
ELSE DO
pp_UpdateUndo
END
pp_EffectOn
if F=0 then DO
pp_SetApen Black
END
ELSE DO
pp_SetApen White
END
pp_Airbrush 100 10
pp_TextDraw x-2 y-2
pp_Airbrush 100 5
pp_TextDraw x y
pp_Spare
pp_TextDraw x y
pp_PermitRefresh
pp_EffectOff
pp_ComposeReqOn
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