Share » Forums » Setup & design » Layering Text using image()

Layering Text using image()

Layering Text using image()

Tuesday 27 April 2004 2:45:49 pm - 3 replies

Modified on Tuesday 27 April 2004 2:46:45 pm by Alex Jones

Author Message

Björn Dieding@xrow.de

Tuesday 27 April 2004 4:08:16 pm

here is some code that works

{image(concat($sitename,' ',$siteslogan),imagefile('logo_blank.png'|ezimage(no)|remove(0,1)),array($sitename|texttoimage('logo'),hash(transparency,0,halign,left,valign,top)),array($siteslogan|texttoimage('logoslogan'),hash(transparency,0,halign,left,valign,top)))}

but when ever I try to add a second one my apache crashed (Windows,apache2)

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Alex Jones

Wednesday 28 April 2004 6:48:41 am

Thanks Björn, I'll try to use yoru code as a starting point. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Wednesday 28 April 2004 8:42:04 am

Well, I am closer than I was thanks to Björn's help, but the result is not quite perfect. I'm really really close though. :) I am now using:
<b>From texttoimage.ini.append</b>
[nav_header_layer_0]
Family=palab
TextColor=#ffffff
BackgroundColor=#FFCC7F

[nav_header_layer_1]
Family=palab
TextColor=#807360
BackgroundColor=#FFCC7F

With this code:

{image( array($specialhead|texttoimage('nav_header_layer_0'), hash(transparency,0,halign,left,valign,top)),
        array($specialhead|texttoimage('nav_header_layer_1'), hash(transparency,0.9,halign,left,valign,top,x,2,y,2)) ) }

But, what I would really like to figure out is how to tell the system to not apply any background color to <i>nav_header_layer_0</i>. If I do not specify the background color it automatically applies a white background which makes the entire image faded. Ideally, I want the background color to be set by <i>nav_header_layer_1</i> which also assigns the text color for the offset (like a shadow). Then <i>nav_header_layer_0</i> should only apply a top layer using white text without any background color.

For a visual check out http://www.silverspider.com/layered_text_example.gif
The top box shows the effect I want to achieve - please ignore the small caps for now - that's another question ;)
The second box shows <i>nav_header_layer_0</i>
The third box shows <i>nav_header_layer_1</i>
The final box shows the result of the above code, merging <i>nav_header_layer_0</i> with <i>nav_header_layer_1</i>.

Notice that in the final box the white text is dulled by the fact that the layer has to be somewhat transparent to allow the brown text behind to show through. Also notice that the brown text isn't as strong as it should be, due to the background color applied by the top layer.

Any ideas?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu