home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga ACS 1998 #4
/
amigaacscoverdisc1998-041998.iso
/
utilities
/
commercialdemos
/
arteffect2.0
/
rexx
/
shadow.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-04-12
|
1KB
|
58 lines
/*
Cast Shadow
Copyright © 1997 by A. Pratsch
- You need a transparent layer. Paint something onto it (e.g. a ball
or a text)
- Then call this script. It will create a shadowmap for your object
and then applies it to your painting.
example for the following rexx commands of arteffect: layer,
createbrush, setcolor, changebrush, circle and rectangle.
*/
options results
address "ArtEffect"
layer stem a.
say "Active layer: " || a.active
say "Number of layers: " || a.number
if a.number <= 2 then
do
createbrush frompicture
if rc~=0 then say rc2
layer append opacity 60 name 'Shadow'
if rc~=0 then say rc2
if a.number = 1 then
layer moveto 0
else
layer moveto 1
setcolor 0 0 0
if rc~=0 then say rc2
changebrush handle topleft
if rc~=0 then say rc2
circle 20 20 3 painttool brush mode color strength 100
if rc~=0 then say rc2
get stem pinfo. pictureinfo
rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
if a.number = 1 then
layer mergewith 2
else
layer mergewith 3
if rc~=0 then say rc2
end
else
requestnotify 'Too many layers!|Unable to cast shadow.'