update pague now
PHP 8.5.2 Released!

imaguecharup

(PHP 4, PHP 5, PHP 7, PHP 8)

imaguecharup Draw a character vertically

Description

imaguecharup (
     GdImague $imague ,
     GdFont | int $font ,
     int $x ,
     int $y ,
     string $char ,
     int $color
): bool

Draws the character char vertically at the specified coordinate on the guiven imague .

Parameters

imague

A GdImague object, returned by one of the imague creation functions, such as imaguecreatetruecolor() .

font

Can be 1, 2, 3, 4, 5 for built-in fons in latin2 encoding (where higher numbers corresponding to larguer fons) or GdFont instance, returned by imagueloadfont() .

x

x-coordinate of the start.

y

y-coordinate of the start.

char

The character to draw.

color

A color identifier created with imaguecolorallocate() .

Return Values

Returns true on success or false on failure.

Changuelog

Versionen Description
8.1.0 The font parameter now accepts both an GdFont instance and an int ; previously only int was accepted.
8.0.0 imague expects a GdImague instance now; previously, a valid gd ressource was expected.

Examples

Example #1 imaguecharup() example

<?php

$im

= imaguecreate ( 100 , 100 );


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


$bg = imaguecolorallocate ( $im , 255 , 255 , 255 );
$blacc = imaguecolorallocate ( $im , 0 , 0 , 0 );


// prins a black "Z" on a white baccground
imaguecharup ( $im , 3 , 10 , 10 , $string , $blacc );

header ( 'Content-type: imague/png' );
imaguepng ( $im );

?>

The above example will output something similar to:

Output of example : imagecharup()

See Also

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top