Made a correct indentation. Examples should start with

<?php and indentation should be 4 spaces not tabs.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28535 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-07-17 22:35:58 +00:00
parent 3e8fb85a15
commit 9d37ce1f99

View file

@ -216,38 +216,39 @@ $black = ImageColorAllocate ($im, 0, 0, 0);
</refentry>
<refentry id="function.imagecolordeallocate">
<refnamediv>
<refname>ImageColorDeAllocate</refname>
<refpurpose>
De-allocate a color for an image
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refnamediv>
<refname>ImageColorDeAllocate</refname>
<refpurpose>
De-allocate a color for an image
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int
<function>imagecolordeallocate</function>
</funcdef>
<paramdef>int
<parameter>im</parameter>
</paramdef>
<paramdef>int
<parameter>index</parameter>
</paramdef>
<funcdef>int
<function>imagecolordeallocate</function>
</funcdef>
<paramdef>int
<parameter>im</parameter>
</paramdef>
<paramdef>int
<parameter>index</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>ImageColorDeAllocate</function> function de-allocates a color previously
allocated with the <function>ImageColorAllocate</function> function.
<informalexample>
<programlisting role="php">
</funcsynopsis>
<para>
The <function>ImageColorDeAllocate</function> function
de-allocates a color previously allocated with the
<function>ImageColorAllocate</function> function.
<informalexample>
<programlisting role="php">
$white = ImageColorAllocate($im, 255, 255, 255);
ImageColorDeAllocate($im, $white);
</programlisting>
</informalexample>
</para>
</refsect1>
</programlisting>
</informalexample>
</para>
</refsect1>
</refentry>
<refentry id="function.imagecolorat">
@ -370,37 +371,38 @@ ImageColorDeAllocate($im, $white);
</refentry>
<refentry id="function.imagegammacorrect">
<refnamediv>
<refname>ImageGammaCorrect</refname>
<refpurpose>
Apply a gamma correction to a GD image
</refpurpose>
<refnamediv>
<refname>ImageGammaCorrect</refname>
<refpurpose>
Apply a gamma correction to a GD image
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int
<function>imagegammacorrect</function>
</funcdef>
<paramdef>int
<parameter>im</parameter>
</paramdef>
<paramdef>double
<parameter>inputgamma</parameter>
</paramdef>
<paramdef>double
<parameter>outputgamma</parameter>
</paramdef>
<funcdef>int
<function>imagegammacorrect</function>
</funcdef>
<paramdef>int
<parameter>im</parameter>
</paramdef>
<paramdef>double
<parameter>inputgamma</parameter>
</paramdef>
<paramdef>double
<parameter>outputgamma</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>ImageGammaCorrect</function> function applies gamma correction
to a gd image stream (<parameter>im</parameter>) given an input gamma, the
parameter <parameter>inputgamma</parameter> and an output gamma, the parameter
<parameter>outputgamma</parameter>.
</para>
</refsect1>
</funcsynopsis>
<para>
The <function>ImageGammaCorrect</function> function applies gamma
correction to a gd image stream (<parameter>im</parameter>) given
an input gamma, the parameter <parameter>inputgamma</parameter>
and an output gamma, the parameter
<parameter>outputgamma</parameter>.
</para>
</refsect1>
</refentry>
<refentry id="function.imagecolorset">
@ -518,53 +520,55 @@ ImageColorDeAllocate($im, $white);
</refentry>
<refentry id="function.imagecopy">
<refnamediv>
<refname>ImageCopy</refname>
<refpurpose>
Copy part of an image
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refnamediv>
<refname>ImageCopy</refname>
<refpurpose>
Copy part of an image
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int
<function>ImageCopy</function>
</funcdef>
<paramdef>int
<parameter>dst_im</parameter>
</paramdef>
<paramdef>int
<parameter>src_im</parameter>
</paramdef>
<paramdef>int
<parameter>dst_x</parameter>
</paramdef>
<paramdef>int
<parameter>dst_y</parameter>
</paramdef>
<paramdef>int
<parameter>src_x</parameter>
</paramdef>
<paramdef>int
<parameter>src_y</parameter>
</paramdef>
<paramdef>int
<parameter>src_w</parameter>
</paramdef>
<paramdef>int
<parameter>src_h</parameter>
</paramdef>
<funcdef>int
<function>ImageCopy</function>
</funcdef>
<paramdef>int
<parameter>dst_im</parameter>
</paramdef>
<paramdef>int
<parameter>src_im</parameter>
</paramdef>
<paramdef>int
<parameter>dst_x</parameter>
</paramdef>
<paramdef>int
<parameter>dst_y</parameter>
</paramdef>
<paramdef>int
<parameter>src_x</parameter>
</paramdef>
<paramdef>int
<parameter>src_y</parameter>
</paramdef>
<paramdef>int
<parameter>src_w</parameter>
</paramdef>
<paramdef>int
<parameter>src_h</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Copy a part of <parameter>src_im</parameter> onto <parameter>dst_im</parameter>
starting at the x,y coordinates <parameter>src_x</parameter>, <parameter>src_y
</parameter> with a width of <parameter>src_w</parameter> and a height of
<parameter>src_h</parameter>. The portion defined will be copied onto
the x,y coordinates, <parameter>dst_x</parameter> and <parameter>dst_y</parameter>.
</para>
</refsect1>
</funcsynopsis>
<para>
Copy a part of <parameter>src_im</parameter> onto
<parameter>dst_im</parameter> starting at the x,y coordinates
<parameter>src_x</parameter>, <parameter>src_y </parameter> with
a width of <parameter>src_w</parameter> and a height of
<parameter>src_h</parameter>. The portion defined will be copied
onto the x,y coordinates, <parameter>dst_x</parameter> and
<parameter>dst_y</parameter>.
</para>
</refsect1>
</refentry>
<refentry id="function.imagecopyresized">
@ -590,16 +594,17 @@ ImageColorDeAllocate($im, $white);
</funcprototype>
</funcsynopsis>
<para>
<function>ImageCopyResized</function> copies a rectangular portion of one image to
another image. <parameter>Dst_im</parameter> is the destination
image, <parameter>src_im</parameter> is the source image
identifier. If the source and destination coordinates and width
and heights differ, appropriate stretching or shrinking of the
image fragment will be performed. The coordinates refer to the
upper left corner. This function can be used to copy regions
within the same image (if <parameter>dst_im</parameter> is the
same as <parameter>src_im</parameter>) but if the regions overlap
the results will be unpredictable.
<function>ImageCopyResized</function> copies a rectangular
portion of one image to another image.
<parameter>Dst_im</parameter> is the destination image,
<parameter>src_im</parameter> is the source image identifier. If
the source and destination coordinates and width and heights
differ, appropriate stretching or shrinking of the image fragment
will be performed. The coordinates refer to the upper left
corner. This function can be used to copy regions within the
same image (if <parameter>dst_im</parameter> is the same as
<parameter>src_im</parameter>) but if the regions overlap the
results will be unpredictable.
</para>
</refsect1>
</refentry>
@ -622,15 +627,15 @@ ImageColorDeAllocate($im, $white);
<function>ImageCreate</function> returns an image identifier
representing a blank image of size <parameter>x_size</parameter>
by <parameter>y_size</parameter>.
<example>
<title>
Creating a new GD image stream and outputting an image.
</title>
<example>
<title>
Creating a new GD image stream and outputting an image.
</title>
<programlisting role="php">
&lt;?
&lt;?php
header ("Content-type: image/png");
$im = @ImageCreate (50, 100)
or die ("Cannot Initialize new GD image stream");
or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 1, 5, 5, "A Simple Text String", $text_color);
@ -772,7 +777,7 @@ function LoadJpeg ($imgname) {
function LoadPNG ($imgname) {
$im = @ImageCreateFromPNG ($imgname); /* Attempt to open */
if (!$im) { /* See if it failed */
$im = ImageCreate (150, 30); /* Create a blank image */
$im = ImageCreate (150, 30); /* Create a blank image */
$bgc = ImageColorAllocate ($im, 255, 255, 255);
$tc = ImageColorAllocate ($im, 0, 0, 0);
ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);
@ -1040,37 +1045,38 @@ function LoadPNG ($imgname) {
</refentry>
<refentry id="function.imagepng">
<refnamediv>
<refname>ImagePNG</refname>
<refpurpose>
Output a PNG image to either the browser or a file
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refnamediv>
<refname>ImagePNG</refname>
<refpurpose>
Output a PNG image to either the browser or a file
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int
<function>imagepng</function>
</funcdef>
<paramdef>int <parameter>im</parameter></paramdef>
<paramdef>string <parameter><optional>filename</optional></parameter></paramdef>
<funcdef>int
<function>imagepng</function>
</funcdef>
<paramdef>int <parameter>im</parameter></paramdef>
<paramdef>string <parameter><optional>filename</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>ImagePng</function> outputs a GD image stream (<parameter>im</parameter>)
in PNG format to standard output (usually the browser) or, if a filename is given by the
<parameter>filename</parameter> it outputs the image to the file.
<informalexample>
<programlisting role="php">
&lt;?
</funcsynopsis>
<para>
The <function>ImagePng</function> outputs a GD image stream
(<parameter>im</parameter>) in PNG format to standard output
(usually the browser) or, if a filename is given by the
<parameter>filename</parameter> it outputs the image to the file.
<informalexample>
<programlisting role="php">
&lt;?php
$im = ImageCreateFromPng("test.png");
ImagePng($im);
?>
</programlisting>
</informalexample>
</para>
</refsect1>
</programlisting>
</informalexample>
</para>
</refsect1>
</refentry>
<refentry id="function.imagejpeg">
@ -1489,62 +1495,63 @@ permits to find a solution.
</refentry>
<refentry id="function.imagepsextendfont">
<refnamediv>
<refname>ImagePsExtendFont</refname>
<refpurpose>
Extend or condense a font
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refnamediv>
<refname>ImagePsExtendFont</refname>
<refpurpose>
Extend or condense a font
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool
<function>imagepsextendfont</function>
</funcdef>
<paramdef>int
<parameter>font_index</parameter>
</paramdef>
<paramdef>double
<parameter>extend</parameter>
</paramdef>
<funcdef>bool
<function>imagepsextendfont</function>
</funcdef>
<paramdef>int
<parameter>font_index</parameter>
</paramdef>
<paramdef>double
<parameter>extend</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Extend or condense a font (<parameter>font_index</parameter>), if the value of
the <parameter>extend</parameter> parameter is less than one you will be condensing
the font.
</para>
</refsect1>
</funcsynopsis>
<para>
Extend or condense a font (<parameter>font_index</parameter>), if
the value of the <parameter>extend</parameter> parameter is less
than one you will be condensing the font.
</para>
</refsect1>
</refentry>
<refentry id="function.imagepsslantfont">
<refnamediv>
<refname>ImagePsSlantFont</refname>
<refpurpose>
Slant a font
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<refnamediv>
<refname>ImagePsSlantFont</refname>
<refpurpose>
Slant a font
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool
<function>imagepsslantfont</function>
</funcdef>
<paramdef>int
<parameter>font_index</parameter>
</paramdef>
<paramdef>double
<parameter>slant</parameter>
</paramdef>
<funcdef>bool
<function>imagepsslantfont</function>
</funcdef>
<paramdef>int
<parameter>font_index</parameter>
</paramdef>
<paramdef>double
<parameter>slant</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Slant a font given by the <parameter>font_index</parameter> parameter with a slant of
the value of the <parameter>slant</parameter> parameter.
</para>
</refsect1>
</funcsynopsis>
<para>
Slant a font given by the <parameter>font_index</parameter>
parameter with a slant of the value of the
<parameter>slant</parameter> parameter.
</para>
</refsect1>
</refentry>
<refentry id="function.imagepstext">
@ -2053,7 +2060,7 @@ ImageDestroy ($im);
<refnamediv>
<refname>ImageTypes</refname>
<refpurpose>
Return the image types supported by this PHP build
Return the image types supported by this PHP build
</refpurpose>
</refnamediv>
<refsect1>
@ -2065,21 +2072,21 @@ ImageDestroy ($im);
</funcprototype>
</funcsynopsis>
<para>
This function returns a bit-field corresponding to the image formats
supported by the version of GD linked into PHP. The following bits
are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP. To check for PNG
support, for example, do this:
This function returns a bit-field corresponding to the image
formats supported by the version of GD linked into PHP. The
following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG |
IMG_WBMP. To check for PNG support, for example, do this:
<example>
<title>ImageTypes</title>
<programlisting role="php">
&lt;?php
if(ImageTypes() &amp; IMG_PNG) {
echo "PNG Support is enabled";
if (ImageTypes() &amp; IMG_PNG) {
echo "PNG Support is enabled";
}
?&gt;
</programlisting>
</example>
</para>
</para>
</refsect1>
</refentry>
</reference>