mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
fixing error in the example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@108531 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1a5f3ee158
commit
dda1ad5989
1 changed files with 6 additions and 6 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.43 -->
|
||||
<refentry id="function.imagesetstyle">
|
||||
<refnamediv>
|
||||
|
@ -27,9 +27,8 @@
|
|||
<example>
|
||||
<title>imagesetstyle</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
header ("Content-type: image/png");
|
||||
header ("Content-type: image/jpeg");
|
||||
$im = imagecreate (100, 100);
|
||||
$w = imagecolorallocate ($im, 255, 255, 255);
|
||||
$red = imagecolorallocate ($im, 255, 0, 0);
|
||||
|
@ -44,14 +43,15 @@ $style = array ($w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$red);
|
|||
imagesetstyle ($im, $style);
|
||||
|
||||
$brush = imagecreatefrompng ("http://www.libpng.org/pub/png/images/smile.happy.png");
|
||||
imagecolortransparent ($brush, $w);
|
||||
$w2 = imagecolorallocate($brush,255,255,255);
|
||||
imagecolortransparent ($brush, $w2);
|
||||
imagesetbrush ($im, $brush);
|
||||
imageline ($im, 100, 0, 0, 100, IMG_COLOR_STYLEDBRUSHED);
|
||||
|
||||
imagepng ($im);
|
||||
imagejpeg ($im);
|
||||
imagedestroy ($im);
|
||||
?>
|
||||
]]>
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue