mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
* Added var_dump() call on imagecolorat() example to make the output as expected
* Added missing ; in the 2nd example on imagedashedline() * Added example for imagesavealpha() * Added example for imagepsfreefont() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265202 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
60fa45559e
commit
875946ea1f
4 changed files with 56 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry xml:id="function.imagecolorat" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>imagecolorat</refname>
|
||||
|
@ -67,6 +67,8 @@ $rgb = imagecolorat($im, 10, 15);
|
|||
$r = ($rgb >> 16) & 0xFF;
|
||||
$g = ($rgb >> 8) & 0xFF;
|
||||
$b = $rgb & 0xFF;
|
||||
|
||||
var_dump($r, $g, $b);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry xml:id="function.imagedashedline" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>imagedashedline</refname>
|
||||
|
@ -125,7 +125,7 @@ $style = Array(
|
|||
IMG_COLOR_TRANSPARENT,
|
||||
IMG_COLOR_TRANSPARENT,
|
||||
IMG_COLOR_TRANSPARENT
|
||||
)
|
||||
);
|
||||
|
||||
imagesetstyle($im, $style);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry xml:id="function.imagepsfreefont" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>imagepsfreefont</refname>
|
||||
|
@ -37,6 +37,27 @@
|
|||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imagepsfreefont</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Load a .pfb font file
|
||||
$font = imagepsloadfont('./bchbi.pfb');
|
||||
|
||||
// Do any operations with the font here
|
||||
|
||||
// Free the font from memory
|
||||
imagepsfreefont($font);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.config.t1lib;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<refentry xml:id="function.imagesavealpha" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>imagesavealpha</refname>
|
||||
|
@ -49,6 +49,34 @@
|
|||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imagesavealpha</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Load a png image with alpha channels
|
||||
$png = imagecreatefrompng('./alphachannel_example.png');
|
||||
|
||||
// Do required operations
|
||||
|
||||
// Turn off alpha blending and set alpha flag
|
||||
imagealphablending($png, false);
|
||||
imagesavealpha($png, true);
|
||||
|
||||
// Output image to browser
|
||||
header('Content-Type: image/png');
|
||||
|
||||
imagepng($png);
|
||||
imagedestroy($png);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.gd.2;
|
||||
|
|
Loading…
Reference in a new issue