GD 関数
PHP Manual

imagestringup

(PHP 4, PHP 5)

imagestringup文字列を垂直に描画する

説明

bool imagestringup ( resource $image , int $font , int $x , int $y , string $string , int $color )

文字列 string を、指定した座標で垂直に描画します。

パラメータ

image

imagecreatetruecolor() のような画像作成関数が返す画像リソース。

font

latin2 エンコーディングの組み込みのフォントの場合は 1, 2, 3, 4, 5 のいずれか (数字が大きなほうが、より大きいフォントに対応します)、 あるいは imageloadfont() で登録したフォントの識別子のいずれか。

x

左上隅の x 座標。

y

左上隅の y 座標。

string

書き出す文字列。

color

imagecolorallocate() で作成した色 ID。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 imagestring() の例

<?php
// 100*100 の画像を作成します
$im imagecreatetruecolor(100100);

// テキストを書き込みます
$textcolor imagecolorallocate($im0xFF0xFF0xFF);
imagestringup($im34080'gd library'$textcolor);

// 画像を保存します
imagepng($im'./stringup.png');
imagedestroy($im);
?>

上の例の出力は、たとえば 以下のようになります。

参考


GD 関数
PHP Manual
アダルトレンタルサーバー