Added example for psloadfont

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@48143 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2001-05-22 09:21:40 +00:00
parent 4a8bbb1abc
commit e212729348

View file

@ -2151,6 +2151,23 @@ ImagePng($im);
function returns false and prints a message describing what went
wrong.
</para>
<para>
<programlisting role="php">
&lt;?php
Header ("Content-type: image/jpeg");
$im = ImageCreate (350, 45);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
$font=ImagePsLoadFont("bchbi.pfb");
// or locate your .pfb files on your machine
ImagePsText($im, "Testing... It worked!",
$font, 32, $white, $black, 32, 32);
ImagePsFreeFont($font);
ImageJpeg($im, "", 100);//for best quality... your mileage may vary
ImageDestroy ($im);
?&gt;
</programlisting role="php">
</para>
<para>
See also <function>ImagePSFreeFont</function>.
</para>