PHP imagecharup - 文字を垂直に描画する

PHP 图像处理PHP 画像処理

imagecharup — 文字を垂直に描画します。

構文

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

imagecharup() は、image で指定した画像上の x, y(画像の左上隅が 0, 0)の位置に、文字 c を垂直に、色 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()新しいフォントを読み込みます。

PHP 图像处理PHP 画像処理

その他の拡張機能