mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
user note integration
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@144568 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8c242a170a
commit
b88be0a9c5
1 changed files with 26 additions and 1 deletions
|
@ -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>
|
||||
|
@ -25,6 +25,31 @@
|
|||
0, 0) in color <parameter>col</parameter>. If font is 1, 2, 3, 4
|
||||
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>
|
||||
|
|
Loading…
Reference in a new issue