communication
 databases
 directories
 file handling
 html and code
 image editing
 image listing
 sessions and co
 string handling
 information
 forms
 apple stuff
 image handling
 array handling
 lixlpixel
php - snippets
google search terms detected and highlighted.
remove highlighting | keep highlighting
make snippet in "image editing" - download "shadowing"
 search
php - snippets

Valid CSS!

php webring logo
prev next
random list
join the Ring!

image editing - shadowing was created/last modified on Mon 06 Oct 2003 7:08 PM

Shadowing

Perhaps the easiest text effect is shadowing.  Shadowing is, quite simply, drawing text at an offset, and then drawing the original text over it.  You could use translucent text to create a better shadow effect, but you haven't read about translucent text yet.

<?php
function imagettftextshadow (& $im ,$size ,$angle ,$x ,$y ,& $col , & $shadowcolor ,$fontfile ,$text ,$offsetx ,$offsety)
{
    
// Draw the shadow
    
$text1 = imagettftext ($im ,$size ,$angle ,$x +$offsetx ,$y +$offsety ,$shadowcolor ,$fontfile ,$text );
    
// Draw the original text
    
$text2 = imagettftext ($im ,$size ,$angle ,$x ,$y ,$col ,$fontfile ,$text );
}
?>

learn more about some of the PHP functions used in this snippet: file, function, imagettftext

view the GNU general license - view the GNU library license - search on PHPsnippets - see your code like this

 a lixlpixel.com site

PHParadise.com - PHP-classes.org - your site on safari