[REBOL] Re: Mix effect
From: anton::wilddsl::net::au at: 26-Mar-2006 12:09
Hi Paul,
I think you mean when you specify an effect of your own
the default effect is lost. I think the EXTEND effect was
lost, which means MIX actually mixed the gradient at normal size
with the glow image at a small size (un-extended).
EXTEND is added near the end of the BTN init code:
>> probe svv/vid-styles/btn/init
...
...
if all [image not effect] [
effect: copy []
if color [repend effect ['colorize color depth]]
repend effect ['extend image/size/2]
]
...
And you can see the OVER looks for 'extend to position the MIX
correctly. It works without the EXTEND, and it does not add it
if it is not there.
>> print mold get in svv/vid-styles/btn/feel 'over
func [face act evt][
remove/part find face/effect 'mix 2
if act [
evt: any [find face/effect 'extend tail face/effect]
insert evt reduce ['mix face/images/3]
]
show face
]
Note that GRADIENT is kind of a "blanket" effect. It overwrites the
rendering image without any kind of blending or consideration for
prior effects.
I think you might be happier with GRADCOL:
layout [
btn "custom effect" with [
append init [append effect [gradcol]]
]
]
Regards,
Anton.