English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagecharup — 垂直に文字を描画します。
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharup() は、キャラクター c を垂直に image 指定の画像に描画し、x、y(画像の左上隅が 0、0)に配置し、color で色付けます。font が 1,2,3,4 または 5、その場合は内蔵のフォントを使用します。
<?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); // 白色の背景に黒い「Z」を表示します。 imagecharup($im, 3, 10, 10, $string, $black); header('Content-type: image/png'); imagepng($im); ?>
以下の例の出力結果の画像はこちらです:
imagechar() 水平に文字を描画します。
imageloadfont() 新しいフォントを読み込んでください。