Gradient and Transparency
[1/3] from: patrick:philipot:laposte at: 1-Jun-2004 13:12
Hello Rebol-List,
Is it possible to apply a gradient to a text, not the the text
background?
This code changes the text background:
view center-face layout [
title "Pat665" yellow effect [gradient 1x1 red blue]
]
Also, is it possible to use transparency (alpha channel) on text?
--
Best regards,
Patrick mailto:[patrick--philipot--laposte--net]
[2/3] from: cyphre::seznam::cz at: 1-Jun-2004 14:25
Hi Patrick,
AFAIK you can't easily use gradients on text in Rebol but there is few ways
how to do it. Below is an example of one possible way(I don't say it is the
most elegant but it works ;-) )
beware of line breaks!
---------------------------<code>-------------------------------------------
--
view layout [
title with [
text: "REBOL"
font: make font [
size: 60
]
para: make para [
scroll: -1000x0
]
effect: compose/deep [
gradient 1x1 red blue
draw [
image 0x0 (to-image layout [origin 0 backcolor 200.200.200 title white
(text) font-size (font/size)]) white
]
]
]
]
--------------------------</code>-------------------------------------------
--
regards,
Cyphre
[3/3] from: patrick:philipot:laposte at: 1-Jun-2004 16:36
Hello Cyphre,
Thank you! I honestly do not understand how it works, but it works.
--
Regards,
Patrick