didou Tue Nov 18 18:26:02 2003 EDT
Modified files: /phpdoc/en/reference/image/functions imagestring.xml Log: user note integration Index: phpdoc/en/reference/image/functions/imagestring.xml diff -u phpdoc/en/reference/image/functions/imagestring.xml:1.3 phpdoc/en/reference/image/functions/imagestring.xml:1.4 --- phpdoc/en/reference/image/functions/imagestring.xml:1.3 Thu Apr 18 13:13:10 2002 +++ phpdoc/en/reference/image/functions/imagestring.xml Tue Nov 18 18:26:02 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/image.xml, last change in rev 1.2 --> <refentry id="function.imagestring"> <refnamediv> @@ -26,6 +26,31 @@ or 5, a built-in font is used. </para> <para> + <example> + <title><function>imagestring</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + + // create a 100*30 image + $im = imagecreate(100, 30); + + // white background and blue text + $bg = imagecolorallocate($im, 255, 255, 255); + $textcolor = imagecolorallocate($im, 0, 0, 255); + + // write the string at the top left + imagestring($im, 5, 0, 0, "Hello world!", $textcolor); + + // output the image + header("Content-type: image/jpg"); + imagejpeg($im); +?> +]]> + </programlisting> + </example> + </para> + <para> See also <function>imageloadfont</function>. </para> </refsect1>