GD and Image Функции
PHP Manual

imagecharup

(PHP 4, PHP 5)

imagecharupDraw a character vertically

Описание

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

Draws the character c vertically at the specified coordinate on the given image .

Параметри

image

Ресурс на изображение, върнат от някоя от функциите за създаване на изображения като например imagecreatetruecolor().

font

Може да бъде 1, 2, 3, 4, 5 за вградените шрифтове, кодирани в latin2, (където по-големите числа означават по-голям шрифт) или някой от вашите собствени идентификатори, регистрирани посредством функция imageloadfont().

x

x-coordinate of the start.

y

y-coordinate of the start.

c

The character to draw.

color

A color identifier created with imagecolorallocate().

Връщани стойности

Връща TRUE при успех или FALSE при неуспех.

Примери

Example #1 imagecharup() example

<?php

$im 
imagecreate(100100);

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

$bg imagecolorallocate($im255255255);
$black imagecolorallocate($im000);

// prints a black "Z" on a white background
imagecharup($im31010$string$black);

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

?>

Примерът по-горе ще изведе нещо подобно на:

Вж. също


GD and Image Функции
PHP Manual