home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
text
/
Emboss.rx
< prev
next >
Wrap
Text File
|
1999-12-18
|
2KB
|
116 lines
/*
Arexx Text Script
*/
options results
parse ARG Port x y b
ADDRESS value Port
pp_AvoidRefresh
F=5
type=0
type2=0
ADDRESS COMMAND
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/Emboss') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/Emboss', "R") then DO
type=READLN('lfile')
F = READLN('lfile')
type2=READLN('lfile')
CALL CLOSE('lfile')
END
END
ADDRESS value Port
pp_DialogInit 150 100 "*Emboss*" 3
pp_Cycle 0 60 5 60 16 "Shift" 1 "Low|High" type
pp_Integer 1 60 25 50 16 "Flow" 1 F
pp_Cycle 2 60 45 60 16 "Smooth" 1 "No|Yes" type2
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_GetDialog 0
type=result
pp_GetDialog 1
F=result
pp_GetDialog 2
type2=result
CALL SavePrefs('Emboss',type,F,type2)
ADDRESS value Port
dec=1
IF type=1 then DO
dec=2
END
IF F>0 then DO
pp_EffectOn
pp_Airbrush 100 F
END
pp_UpdateUndo
pp_GetApen
Aclr=result
pp_ClosestColorD Aclr 80
C0=result
pp_ClosestColorL Aclr 80
C1=result
pp_SetApen C0
pp_TextDraw x-dec y-dec
pp_SetApen C1
pp_TextDraw x+dec y+dec
IF F>0 then DO
IF type2=0 then DO
pp_EffectOff
END
END
pp_SetApen Aclr
pp_TextDraw x y
pp_PermitRefresh
pp_EffectOff
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