Example #1
0
function draw_text($the_image, $size, $x, $y, $color, $alpha, $text)
{
    $alpha = $alpha ? $alpha : 127;
    $shadow_color = imagecolorallocate($the_image, 0, 0, 0);
    $alpha_color = imagecolorallocatealpha($the_image, 0, 0, 0, $alpha);
    $font = sep_path(CMS_DIR . '/templates/' . Template::used_template() . '/fonts/verdana.ttf');
    imagettftext($the_image, $size, 0, $x + 1, $y + 2, $shadow_color, $font, $text);
    imagettftext($the_image, $size, 0, $x, $y, $color, $font, $text);
    imagettftext($the_image, $size, 0, $x, $y, $alpha_color, $font, $text);
}