文字列を垂直に描画する
$image
$font
$x
$y
$string
$color
文字列 string を、指定した座標で垂直に描画します。
string
image
imagecreatetruecolorのような画像作成関数が返す GdImage オブジェクト。
font
latin2 エンコーディングの組み込みのフォントの場合は 1, 2, 3, 4, 5 のいずれか (数字が大きなほうが、より大きいフォントに対応します)、あるいは imageloadfont が返した、GdFont クラスのインスタンスのいずれか。
x
左下隅の x 座標。
y
左下隅の y 座標。
書き出す文字列。
color
imagecolorallocate で作成された色識別子。
成功した場合に true を、失敗した場合に false を返します。
true
false
gd
例1 imagestringup の例
<?php // 100*100 の画像を作成します $im = imagecreatetruecolor(100, 100); // テキストを書き込みます $textcolor = imagecolorallocate($im, 0xFF, 0xFF, 0xFF); imagestringup($im, 3, 40, 80, 'gd library', $textcolor); // 画像を保存します imagepng($im, './stringup.png'); ?>
上の例の出力は、 たとえば以下のようになります。