imagecharup

(PHP 3, PHP 4, PHP 5)

imagecharup -- 垂直に文字を描画

説明

int imagecharup ( resource image, int font, int x, int y, string c, int color )

imagecharup()は、画像image の座標(x,y)(左上が0,0)から color色で cの最初の文字を垂直に描画します。 fontが 1, 2, 3, 4 , 5の場合は、組込みフォントが使用されます。

例 1. imagecharup()の例

<?php

$im
= imagecreate(100,100);

$string = 'Note that the first letter is a N';

$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);

// prints a black "Z" on a white background
imagecharup($im, 3, 10, 10, $string, $black);

header('Content-type: image/png');
imagepng($im);

?>

imagechar()imageloadfont()も参考にしてください。