cvs: /phpdoc/functions image.sgml network.sgml var.sgml

From: Date: Mon, 06 Sep 1999 04:22:23 +0000
Subject: cvs: /phpdoc/functions image.sgml network.sgml var.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-10596@lists.php.net to get a copy of this message
coar Mon Sep 6 00:22:23 1999 EDT Modified files: /phpdoc/functions image.sgml network.sgml var.sgml Log: More function docco reordering.. Index: phpdoc/functions/image.sgml diff -u phpdoc/functions/image.sgml:1.4 phpdoc/functions/image.sgml:1.5 --- phpdoc/functions/image.sgml:1.4 Tue Aug 24 14:42:26 1999 +++ phpdoc/functions/image.sgml Mon Sep 6 00:22:22 1999 @@ -178,6 +178,164 @@ </refsect1> </refentry> + <refentry id="function.imagecolorat"> + <refnamediv> + <refname>ImageColorAt</refname> + <refpurpose>get the index of the color of a pixel</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagecolorat</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> + </funcsynopsis> + <para> + Returns the index of the color of the pixel at the + specified location in the image. + <para> + See also <function>imagecolorset</function> and + <function>imagecolorsforindex</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorclosest"> + <refnamediv> + <refname>ImageColorClosest</refname> + <refpurpose>get the index of the closest color to the specified color</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagecolorclosest</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + </funcsynopsis> + <para> + Returns the index of the color in the palette of the image + which is "closest" to the specified RGB value. + <para> + The "distance" between the desired color and each color in the palette is + calculated as if the RGB values represented points in three-dimensional + space. + <para> + See also <function>imagecolorexact</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorexact"> + <refnamediv> + <refname>ImageColorExact</refname> + <refpurpose>get the index of the specified color</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagecolorexact</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + </funcsynopsis> + <para> + Returns the index of the specified color in the palette of the image. + <para> + If the color does not exist in the image's palette, -1 is returned. + <para> + See also <function>imagecolorclosest</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorresolve"> + <refnamediv> + <refname>ImageColorResolve</refname> + <refpurpose>get the index of the specified color or its closest possible alternative</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagecolorresolve</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + </funcsynopsis> + <para> + This function is guaranteed to return a color index for a requested color, either the exact color + or the closest possible alternative. + <para> + See also <function>imagecolorclosest</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorset"> + <refnamediv> + <refname>ImageColorSet</refname> + <refpurpose>set the color for the specified palette index</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>bool <function>imagecolorset</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>index</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + </funcsynopsis> + <para> + This sets the specified index in the palette to the specified + color. This is useful for creating flood-fill-like effects in + paletted images without the overhead of performing the actual + flood-fill. + <para> + See also <function>imagecolorat</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorsforindex"> + <refnamediv> + <refname>ImageColorsForIndex</refname> + <refpurpose>get the colors for an index</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>array <function>imagecolorsforindex</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>index</parameter></paramdef> + </funcsynopsis> + <para> + This returns an associative array with red, green, and blue keys + that contain the appropriate values for the specified color index. + <para> + See also <function>imagecolorat</function> and + <function>imagecolorexact</function>. + </refsect1> + </refentry> + + <refentry id="function.imagecolorstotal"> + <refnamediv> + <refname>ImageColorsTotal</refname> + <refpurpose>find out the number of colors in an image's palette</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagecolorstotal</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + </funcsynopsis> + <para> + This returns the number of colors in the specified image's palette. + <para> + See also <function>imagecolorat</function> and + <function>imagecolorsforindex</function>. + </refsect1> + </refentry> + <refentry id="function.imagecolortransparent"> <refnamediv> <refname>ImageColorTransparent</refname> @@ -635,53 +793,314 @@ </refsect1> </refentry> - <refentry id="function.imagerectangle"> + <refentry id="function.imagepsbbox"> <refnamediv> - <refname>ImageRectangle</refname> - <refpurpose>draw a rectangle</refpurpose> + <refname>ImagePSBBox</refname> + <refpurpose>give the bounding box of a text rectangle using PostScript Type1 fonts</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> - <funcdef>int <function>imagerectangle</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>x1</parameter></paramdef> - <paramdef>int <parameter>y1</parameter></paramdef> - <paramdef>int <parameter>x2</parameter></paramdef> - <paramdef>int <parameter>y2</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> + <funcdef>array <function>imagepsbbox</function></funcdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>int <parameter>font</parameter></paramdef> + <paramdef>int <parameter>size</parameter></paramdef> + <paramdef>int <parameter>space</parameter></paramdef> + <paramdef>int <parameter>width</parameter></paramdef> + <paramdef>float <parameter>angle</parameter></paramdef> </funcsynopsis> -<para> ImageRectangle creates a rectangle of color col in image im - starting at upper left coordinate x1,y1 and ending at bottom right coordinate x2,y2. 0,0 is the top - left corner of the image. + <para> + <parameter>size</parameter> is expressed in pixels. + <para> + <parameter>space</parameter> allows you to change the default value of a space in a font. + This amount is added to the normal value and can also be negative. + <para> + <parameter>tightness</parameter> allows you to control the amount of white space + between characters. This amount is added to the normal character width and can also be negative. + <para> + <parameter>angle</parameter> is in degrees. + <para> + Parameters <parameter>space</parameter> and <parameter>tightness</parameter> + are expressed in character space units, where 1 unit is 1/1000th of an em-square. + <para> + Parameters <parameter>space</parameter>, <parameter>tightness</parameter> and + <parameter>angle</parameter> are optional. + <para> + The bounding box is calculated using information available from character metrics, + and unfortunately tends to differ slightly from the results achieved by actually + rasterizing the text. If the angle is 0 degrees, you can expect the text to need + 1 pixel more to every direction. + <para> + This function returns an array containing the following elements: + <informaltable> + <tgroup cols="2"> + <tbody> + <row> + <entry>0</entry> + <entry>lower left x-coordinate</entry> + </row> + <row> + <entry>1</entry> + <entry>lower left y-coordinate</entry> + </row> + <row> + <entry>2</entry> + <entry>upper right x-coordinate</entry> + </row> + <row> + <entry>3</entry> + <entry>upper right y-coordinate</entry> + </row> + </tbody> + </tgroup> + </informaltable> + <para> + See also <function>imagepstext</function>. </refsect1> </refentry> - <refentry id="function.imagesetpixel"> +<!-- The function in t1lib which this function uses seems to be buggy... +Currently, just comment out everywhere in the docs and source until time +permits to find a solution. + + <refentry id="function.imagepscopyfont"> <refnamediv> - <refname>ImageSetPixel</refname> - <refpurpose>set a single pixel</refpurpose> + <refname>ImagePSCopyFont</refname> + <refpurpose>make a copy of an already loaded font for further modification</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> - <funcdef>int <function>imagesetpixel</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>x</parameter></paramdef> - <paramdef>int <parameter>y</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> + <funcdef>int <function>imagepscopyfont</function></funcdef> + <paramdef>int <parameter>fontindex</parameter></paramdef> </funcsynopsis> -<para> ImageSetPixel draws a pixel at x,y - (top left is 0,0) in image im - of color col. - <para> See also <function>imagecreate</function> and <function>imagecolorallocate</function>. - </refsect1> - </refentry> - - <refentry id="function.imagestring"> - <refnamediv> - <refname>ImageString</refname> - <refpurpose>draw a string horizontally</refpurpose> + <para> + Use this function if you need make further modifications to the font, + for example extending/condensing, slanting it or changing it's character + encoding vector, but need to keep the original along as well. Note that + the font you want to copy must be one obtained using <function>imagepsloadfont</function>, + not a font that is itself a copied one. You can although make modifications to it before copying, + <para> + If you use this function, you <emphasis>must</emphasis> free the fonts obtained this + way yourself and in reverse order. Otherwise your script <emphasis>will</emphasis> hang. + <para> + In the case everything went right, a valid font index will be returned and + can be used for further purposes. Otherwise the function returns false and + prints a message describing what went wrong. + <para> + See also <function>imageploadpsfont</function>. + </refsect1> + </refentry> +--> + + <refentry id="function.imagepsencodefont"> + <refnamediv> + <refname>ImagePSEncodeFont</refname> + <refpurpose>change the character encoding vector of a font</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagepsencodefont</function></funcdef> + <paramdef>string <parameter>encodingfile</parameter></paramdef> + </funcsynopsis> + + <para> + Loads a character encoding vector from from a file and changes the fonts + encoding vector to it. As a PostScript fonts default vector lacks most of the + character positions above 127, you'll definitely want to change this if + you use an other language than english. The exact format of this file is + described in T1libs documentation. T1lib comes with two ready-to-use files, + IsoLatin1.enc and IsoLatin2.enc. + <para> + If you find yourself using this function all the time, a much + better way to define the encoding is to set ps.default_encoding in + the <link linkend="configuration.file">configuration file</link> + to point to the right encoding file and all fonts you load will + automatically have the right encoding. + </refsect1> + </refentry> + + <refentry id="function.imagepsfreefont"> + <refnamediv> + <refname>ImagePSFreeFont</refname> + <refpurpose>free memory used by a PostScript Type 1 font</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>void <function>imagepsfreefont</function></funcdef> + <paramdef>int <parameter>fontindex</parameter></paramdef> + </funcsynopsis> + <para> + See also <function>imagepsloadfont</function>. + </refsect1> + </refentry> + + <refentry id="function.imagepsloadfont"> + <refnamediv> + <refname>ImagePSLoadFont</refname> + <refpurpose>load a PostScript Type 1 from file</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagepsloadfont</function></funcdef> + <paramdef>string <parameter>filename</parameter></paramdef> + </funcsynopsis> + <para> + In the case everything went right, a valid font index will be returned and + can be used for further purposes. Otherwise the function returns false and + prints a message describing what went wrong. + <para> + See also <function>imagepsfreefont</function>. + </refsect1> + </refentry> + + <refentry id="function.imagepstext"> + <refnamediv> + <refname>ImagePSText</refname> + <refpurpose>to draw a text string over an image using PostScript Type1 fonts</refpurpose> + </refnamediv> + <refsect1> + <title>Descriptiom</title> + <funcsynopsis> + <funcdef>array <function>imagepstext</function></funcdef> + <paramdef>int <parameter>image</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>int <parameter>font</parameter></paramdef> + <paramdef>int <parameter>size</parameter></paramdef> + <paramdef>int <parameter>foreground</parameter></paramdef> + <paramdef>int <parameter>background</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> + <paramdef>int <parameter> + <optional>space</optional></parameter></paramdef> + <paramdef>int <parameter> + <optional>tightness</optional></parameter></paramdef> + <paramdef>float <parameter> + <optional>angle</optional></parameter></paramdef> + <paramdef>int <parameter> + <optional>antialias_steps</optional></parameter></paramdef> + </funcsynopsis> + <para> + <parameter>size</parameter> is expressed in pixels. + <para> + <parameter>foreground</parameter> is the color in which the text + will be painted. <parameter>background</parameter> is the color + to which the text will try to fade in with antialiasing. No + pixels with the color <parameter>background</parameter> are + actually painted, so the background image does not need to be of + solid color. + <para> + The coordinates given by <parameter>x</parameter>, + <parameter>y</parameter> will define the origin (or reference + point) of the first character (roughly the lower-left corner of + the character). This is different from the + <function>ImageString</function>, where x, y define the + upper-right corner of the first character. Refer to PostScipt + documentation about fonts and their measuring system if you have + trouble understanding how this works. + <para> + <parameter>space</parameter> allows you to change the default + value of a space in a font. This amount is added to the normal + value and can also be negative. + <para> + <parameter>tightness</parameter> allows you to control the amount + of white space between characters. This amount is added to the + normal character width and can also be negative. + <para> + <parameter>angle</parameter> is in degrees. + <para> + <parameter>antialias_steps</parameter> allows you to control the + number of colours used for antialiasing text. Allowed values are + 4 and 16. The higher value is recommended for text sizes lower + than 20, where the effect in text quality is quite visible. With + bigger sizes, use 4. It's less computationally intensive. + <para> + Parameters <parameter>space</parameter> and + <parameter>tightness</parameter> are expressed in character space + units, where 1 unit is 1/1000th of an em-square. + <para> + Parameters <parameter>space</parameter>, + <parameter>tightness</parameter>, <parameter>angle</parameter> + and <parameter>antialias</parameter> are optional. + <para> + This function returns an array containing the following elements: + <informaltable> + <tgroup cols="2"> + <tbody> + <row> + <entry>0</entry> + <entry>lower left x-coordinate</entry> + </row> + <row> + <entry>1</entry> + <entry>lower left y-coordinate</entry> + </row> + <row> + <entry>2</entry> + <entry>upper right x-coordinate</entry> + </row> + <row> + <entry>3</entry> + <entry>upper right y-coordinate</entry> + </row> + </tbody> + </tgroup> + </informaltable> + <para> + See also <function>imagepsbbox</function>. + </refsect1> + </refentry> + + <refentry id="function.imagerectangle"> + <refnamediv> + <refname>ImageRectangle</refname> + <refpurpose>draw a rectangle</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagerectangle</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>x1</parameter></paramdef> + <paramdef>int <parameter>y1</parameter></paramdef> + <paramdef>int <parameter>x2</parameter></paramdef> + <paramdef>int <parameter>y2</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcsynopsis> +<para> ImageRectangle creates a rectangle of color col in image im + starting at upper left coordinate x1,y1 and ending at bottom right coordinate x2,y2. 0,0 is the top + left corner of the image. + </refsect1> + </refentry> + + <refentry id="function.imagesetpixel"> + <refnamediv> + <refname>ImageSetPixel</refname> + <refpurpose>set a single pixel</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>imagesetpixel</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcsynopsis> +<para> ImageSetPixel draws a pixel at x,y + (top left is 0,0) in image im + of color col. + <para> See also <function>imagecreate</function> and <function>imagecolorallocate</function>. + </refsect1> + </refentry> + + <refentry id="function.imagestring"> + <refnamediv> + <refname>ImageString</refname> + <refpurpose>draw a string horizontally</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -926,425 +1345,6 @@ url="&url.freetype;">FreeType</ulink> library. <para> See also <function>ImageTTFBBox</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorat"> - <refnamediv> - <refname>ImageColorAt</refname> - <refpurpose>get the index of the color of a pixel</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagecolorat</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>x</parameter></paramdef> - <paramdef>int <parameter>y</parameter></paramdef> - </funcsynopsis> - <para> - Returns the index of the color of the pixel at the - specified location in the image. - <para> - See also <function>imagecolorset</function> and - <function>imagecolorsforindex</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorclosest"> - <refnamediv> - <refname>ImageColorClosest</refname> - <refpurpose>get the index of the closest color to the specified color</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagecolorclosest</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>red</parameter></paramdef> - <paramdef>int <parameter>green</parameter></paramdef> - <paramdef>int <parameter>blue</parameter></paramdef> - </funcsynopsis> - <para> - Returns the index of the color in the palette of the image - which is "closest" to the specified RGB value. - <para> - The "distance" between the desired color and each color in the palette is - calculated as if the RGB values represented points in three-dimensional - space. - <para> - See also <function>imagecolorexact</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorexact"> - <refnamediv> - <refname>ImageColorExact</refname> - <refpurpose>get the index of the specified color</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagecolorexact</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>red</parameter></paramdef> - <paramdef>int <parameter>green</parameter></paramdef> - <paramdef>int <parameter>blue</parameter></paramdef> - </funcsynopsis> - <para> - Returns the index of the specified color in the palette of the image. - <para> - If the color does not exist in the image's palette, -1 is returned. - <para> - See also <function>imagecolorclosest</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorresolve"> - <refnamediv> - <refname>ImageColorResolve</refname> - <refpurpose>get the index of the specified color or its closest possible alternative</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagecolorresolve</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>red</parameter></paramdef> - <paramdef>int <parameter>green</parameter></paramdef> - <paramdef>int <parameter>blue</parameter></paramdef> - </funcsynopsis> - <para> - This function is guaranteed to return a color index for a requested color, either the exact color - or the closest possible alternative. - <para> - See also <function>imagecolorclosest</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorset"> - <refnamediv> - <refname>ImageColorSet</refname> - <refpurpose>set the color for the specified palette index</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>bool <function>imagecolorset</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>index</parameter></paramdef> - <paramdef>int <parameter>red</parameter></paramdef> - <paramdef>int <parameter>green</parameter></paramdef> - <paramdef>int <parameter>blue</parameter></paramdef> - </funcsynopsis> - <para> - This sets the specified index in the palette to the specified - color. This is useful for creating flood-fill-like effects in - paletted images without the overhead of performing the actual - flood-fill. - <para> - See also <function>imagecolorat</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorsforindex"> - <refnamediv> - <refname>ImageColorsForIndex</refname> - <refpurpose>get the colors for an index</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>array <function>imagecolorsforindex</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - <paramdef>int <parameter>index</parameter></paramdef> - </funcsynopsis> - <para> - This returns an associative array with red, green, and blue keys - that contain the appropriate values for the specified color index. - <para> - See also <function>imagecolorat</function> and - <function>imagecolorexact</function>. - </refsect1> - </refentry> - - <refentry id="function.imagecolorstotal"> - <refnamediv> - <refname>ImageColorsTotal</refname> - <refpurpose>find out the number of colors in an image's palette</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagecolorstotal</function></funcdef> - <paramdef>int <parameter>im</parameter></paramdef> - </funcsynopsis> - <para> - This returns the number of colors in the specified image's palette. - <para> - See also <function>imagecolorat</function> and - <function>imagecolorsforindex</function>. - </refsect1> - </refentry> - - <refentry id="function.imagepsloadfont"> - <refnamediv> - <refname>ImagePSLoadFont</refname> - <refpurpose>load a PostScript Type 1 from file</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagepsloadfont</function></funcdef> - <paramdef>string <parameter>filename</parameter></paramdef> - </funcsynopsis> - <para> - In the case everything went right, a valid font index will be returned and - can be used for further purposes. Otherwise the function returns false and - prints a message describing what went wrong. - <para> - See also <function>imagepsfreefont</function>. - </refsect1> - </refentry> - - <refentry id="function.imagepsfreefont"> - <refnamediv> - <refname>ImagePSFreeFont</refname> - <refpurpose>free memory used by a PostScript Type 1 font</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>void <function>imagepsfreefont</function></funcdef> - <paramdef>int <parameter>fontindex</parameter></paramdef> - </funcsynopsis> - <para> - See also <function>imagepsloadfont</function>. - </refsect1> - </refentry> - -<!-- The function in t1lib which this function uses seems to be buggy... -Currently, just comment out everywhere in the docs and source until time -permits to find a solution. - - <refentry id="function.imagepscopyfont"> - <refnamediv> - <refname>ImagePSCopyFont</refname> - <refpurpose>make a copy of an already loaded font for further modification</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagepscopyfont</function></funcdef> - <paramdef>int <parameter>fontindex</parameter></paramdef> - </funcsynopsis> - <para> - Use this function if you need make further modifications to the font, - for example extending/condensing, slanting it or changing it's character - encoding vector, but need to keep the original along as well. Note that - the font you want to copy must be one obtained using <function>imagepsloadfont</function>, - not a font that is itself a copied one. You can although make modifications to it before copying, - <para> - If you use this function, you <emphasis>must</emphasis> free the fonts obtained this - way yourself and in reverse order. Otherwise your script <emphasis>will</emphasis> hang. - <para> - In the case everything went right, a valid font index will be returned and - can be used for further purposes. Otherwise the function returns false and - prints a message describing what went wrong. - <para> - See also <function>imageploadpsfont</function>. - </refsect1> - </refentry> ---> - - <refentry id="function.imagepsencodefont"> - <refnamediv> - <refname>ImagePSEncodeFont</refname> - <refpurpose>change the character encoding vector of a font</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>imagepsencodefont</function></funcdef> - <paramdef>string <parameter>encodingfile</parameter></paramdef> - </funcsynopsis> - - <para> - Loads a character encoding vector from from a file and changes the fonts - encoding vector to it. As a PostScript fonts default vector lacks most of the - character positions above 127, you'll definitely want to change this if - you use an other language than english. The exact format of this file is - described in T1libs documentation. T1lib comes with two ready-to-use files, - IsoLatin1.enc and IsoLatin2.enc. - <para> - If you find yourself using this function all the time, a much - better way to define the encoding is to set ps.default_encoding in - the <link linkend="configuration.file">configuration file</link> - to point to the right encoding file and all fonts you load will - automatically have the right encoding. - </refsect1> - </refentry> - - <refentry id="function.imagepstext"> - <refnamediv> - <refname>ImagePSText</refname> - <refpurpose>to draw a text string over an image using PostScript Type1 fonts</refpurpose> - </refnamediv> - <refsect1> - <title>Descriptiom</title> - <funcsynopsis> - <funcdef>array <function>imagepstext</function></funcdef> - <paramdef>int <parameter>image</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - <paramdef>int <parameter>font</parameter></paramdef> - <paramdef>int <parameter>size</parameter></paramdef> - <paramdef>int <parameter>foreground</parameter></paramdef> - <paramdef>int <parameter>background</parameter></paramdef> - <paramdef>int <parameter>x</parameter></paramdef> - <paramdef>int <parameter>y</parameter></paramdef> - <paramdef>int <parameter> - <optional>space</optional></parameter></paramdef> - <paramdef>int <parameter> - <optional>tightness</optional></parameter></paramdef> - <paramdef>float <parameter> - <optional>angle</optional></parameter></paramdef> - <paramdef>int <parameter> - <optional>antialias_steps</optional></parameter></paramdef> - </funcsynopsis> - <para> - <parameter>size</parameter> is expressed in pixels. - <para> - <parameter>foreground</parameter> is the color in which the text - will be painted. <parameter>background</parameter> is the color - to which the text will try to fade in with antialiasing. No - pixels with the color <parameter>background</parameter> are - actually painted, so the background image does not need to be of - solid color. - <para> - The coordinates given by <parameter>x</parameter>, - <parameter>y</parameter> will define the origin (or reference - point) of the first character (roughly the lower-left corner of - the character). This is different from the - <function>ImageString</function>, where x, y define the - upper-right corner of the first character. Refer to PostScipt - documentation about fonts and their measuring system if you have - trouble understanding how this works. - <para> - <parameter>space</parameter> allows you to change the default - value of a space in a font. This amount is added to the normal - value and can also be negative. - <para> - <parameter>tightness</parameter> allows you to control the amount - of white space between characters. This amount is added to the - normal character width and can also be negative. - <para> - <parameter>angle</parameter> is in degrees. - <para> - <parameter>antialias_steps</parameter> allows you to control the - number of colours used for antialiasing text. Allowed values are - 4 and 16. The higher value is recommended for text sizes lower - than 20, where the effect in text quality is quite visible. With - bigger sizes, use 4. It's less computationally intensive. - <para> - Parameters <parameter>space</parameter> and - <parameter>tightness</parameter> are expressed in character space - units, where 1 unit is 1/1000th of an em-square. - <para> - Parameters <parameter>space</parameter>, - <parameter>tightness</parameter>, <parameter>angle</parameter> - and <parameter>antialias</parameter> are optional. - <para> - This function returns an array containing the following elements: - <informaltable> - <tgroup cols="2"> - <tbody> - <row> - <entry>0</entry> - <entry>lower left x-coordinate</entry> - </row> - <row> - <entry>1</entry> - <entry>lower left y-coordinate</entry> - </row> - <row> - <entry>2</entry> - <entry>upper right x-coordinate</entry> - </row> - <row> - <entry>3</entry> - <entry>upper right y-coordinate</entry> - </row> - </tbody> - </tgroup> - </informaltable> - <para> - See also <function>imagepsbbox</function>. - </refsect1> - </refentry> - - <refentry id="function.imagepsbbox"> - <refnamediv> - <refname>ImagePSBBox</refname> - <refpurpose>give the bounding box of a text rectangle using PostScript Type1 fonts</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>array <function>imagepsbbox</function></funcdef> - <paramdef>string <parameter>text</parameter></paramdef> - <paramdef>int <parameter>font</parameter></paramdef> - <paramdef>int <parameter>size</parameter></paramdef> - <paramdef>int <parameter>space</parameter></paramdef> - <paramdef>int <parameter>width</parameter></paramdef> - <paramdef>float <parameter>angle</parameter></paramdef> - </funcsynopsis> - <para> - <parameter>size</parameter> is expressed in pixels. - <para> - <parameter>space</parameter> allows you to change the default value of a space in a font. - This amount is added to the normal value and can also be negative. - <para> - <parameter>tightness</parameter> allows you to control the amount of white space - between characters. This amount is added to the normal character width and can also be negative. - <para> - <parameter>angle</parameter> is in degrees. - <para> - Parameters <parameter>space</parameter> and <parameter>tightness</parameter> - are expressed in character space units, where 1 unit is 1/1000th of an em-square. - <para> - Parameters <parameter>space</parameter>, <parameter>tightness</parameter> and - <parameter>angle</parameter> are optional. - <para> - The bounding box is calculated using information available from character metrics, - and unfortunately tends to differ slightly from the results achieved by actually - rasterizing the text. If the angle is 0 degrees, you can expect the text to need - 1 pixel more to every direction. - <para> - This function returns an array containing the following elements: - <informaltable> - <tgroup cols="2"> - <tbody> - <row> - <entry>0</entry> - <entry>lower left x-coordinate</entry> - </row> - <row> - <entry>1</entry> - <entry>lower left y-coordinate</entry> - </row> - <row> - <entry>2</entry> - <entry>upper right x-coordinate</entry> - </row> - <row> - <entry>3</entry> - <entry>upper right y-coordinate</entry> - </row> - </tbody> - </tgroup> - </informaltable> - <para> - See also <function>imagepstext</function>. </refsect1> </refentry> Index: phpdoc/functions/network.sgml diff -u phpdoc/functions/network.sgml:1.3 phpdoc/functions/network.sgml:1.4 --- phpdoc/functions/network.sgml:1.3 Mon Jul 12 03:28:14 1999 +++ phpdoc/functions/network.sgml Mon Sep 6 00:22:22 1999 @@ -2,6 +2,98 @@ <title>Network functions</title> <titleabbrev>Network</titleabbrev> + <refentry id="function.checkdnsrr"> + <refnamediv> + <refname>checkdnsrr</refname> + <refpurpose>Check DNS records corresponding to a given + Internet host name or IP address.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>checkdnsrr</function></funcdef> + <paramdef>string <parameter>host</parameter></paramdef> + <paramdef>string <parameter><optional>type</optional></parameter></paramdef> + </funcsynopsis> + + <simpara> + Searches DNS for records of type <parameter>type</parameter> + corresponding to <parameter>host</parameter>. Returns true if any + records are found; returns false if no records were found or if + an error occurred. + + <simpara> + <parameter>type</parameter> may be any one of: A, MX, NS, SOA, + PTR, CNAME, or ANY. The default is MX. + + <simpara> + <parameter>host</parameter> may either be the IP address in + dotted-quad notation or the host name. + + <simpara> + See also + <function>getmxrr</function>, + <function>gethostbyaddr</function>, + <function>gethostbyname</function>, + <function>gethostbynamel</function>, and + the named(8) manual page. + + </refsect1> + </refentry> + + <refentry id="function.closelog"> + <refnamediv> + <refname>closelog</refname> + <refpurpose>close connection to system logger</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>closelog</function></funcdef> + <void> + </funcsynopsis> + <para> + <function>closelog</function> closes the descriptor being used to + write to the system logger. The use of + <function>closelog</function> is optional. + </refsect1> + </refentry> + + <refentry id="function.debugger-off"> + <refnamediv> + <refname>debugger_off</refname> + <refpurpose>disable internal PHP debugger</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>debugger_off</function></funcdef> + <void> + </funcsynopsis> + <para> + Disables the internal PHP debugger. The debugger is still under + development. + </refsect1> + </refentry> + + <refentry id="function.debugger-on"> + <refnamediv> + <refname>debugger_on</refname> + <refpurpose>enable internal PHP debugger</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>debugger_on</function></funcdef> + <paramdef>string <parameter>address</parameter></paramdef> + </funcsynopsis> + <para> + Enables the internal PHP debugger, connecting it to + <parameter>address</parameter>. The debugger is still under + development. + </refsect1> + </refentry> + <refentry id="function.fsockopen"> <refnamediv> <refname>fsockopen</refname> @@ -73,54 +165,6 @@ </refsect1> </refentry> - <refentry id="function.pfsockopen"> - <refnamediv> - <refname>pfsockopen</refname> - <refpurpose>Open persistent Internet or Unix domain socket connection.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>pfsockopen</function></funcdef> - <paramdef>string <parameter>hostname</parameter></paramdef> - <paramdef>int <parameter>port</parameter></paramdef> - <paramdef>int <parameter><optional>errno</optional></parameter></paramdef> - <paramdef>string <parameter><optional>errstr</optional></parameter></paramdef> - <paramdef>int - <parameter><optional>timeout</optional></parameter></paramdef> - </funcsynopsis> - - <para> - This function behaves exactly as <function>fsockopen</function> with the - difference that the connection is not closed after the script finishes. - It is the persistent version of <function>fsockopen</function>. - </refsect1> - </refentry> - - <refentry id="function.set-socket-blocking"> - <refnamediv> - <refname>set_socket_blocking</refname> - <refpurpose>Set blocking/non-blocking mode on a socket</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>set_socket_blocking</function></funcdef> - <paramdef>int <parameter>socket descriptor</parameter></paramdef> - <paramdef>int <parameter>mode</parameter></paramdef> - </funcsynopsis> - <para> - If <parameter>mode</parameter> is false, the given socket - descriptor will be switched to non-blocking mode, and if true, it - will be switched to blocking mode. This affects calls like - <function>fgets</function> that read from the socket. In - non-blocking mode an fgets() call will always return right away - while in blocking mode it will wait for data to become available - on the socket. - - </refsect1> - </refentry> - <refentry id="function.gethostbyaddr"> <refnamediv> <refname>gethostbyaddr</refname> @@ -196,45 +240,6 @@ </refsect1> </refentry> - <refentry id="function.checkdnsrr"> - <refnamediv> - <refname>checkdnsrr</refname> - <refpurpose>Check DNS records corresponding to a given - Internet host name or IP address.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>checkdnsrr</function></funcdef> - <paramdef>string <parameter>host</parameter></paramdef> - <paramdef>string <parameter><optional>type</optional></parameter></paramdef> - </funcsynopsis> - - <simpara> - Searches DNS for records of type <parameter>type</parameter> - corresponding to <parameter>host</parameter>. Returns true if any - records are found; returns false if no records were found or if - an error occurred. - - <simpara> - <parameter>type</parameter> may be any one of: A, MX, NS, SOA, - PTR, CNAME, or ANY. The default is MX. - - <simpara> - <parameter>host</parameter> may either be the IP address in - dotted-quad notation or the host name. - - <simpara> - See also - <function>getmxrr</function>, - <function>gethostbyaddr</function>, - <function>gethostbyname</function>, - <function>gethostbynamel</function>, and - the named(8) manual page. - - </refsect1> - </refentry> - <refentry id="function.getmxrr"> <refnamediv> <refname>getmxrr</refname> @@ -300,86 +305,81 @@ </refsect1> </refentry> - <refentry id="function.syslog"> + <refentry id="function.pfsockopen"> <refnamediv> - <refname>syslog</refname> - <refpurpose>generate a system log message</refpurpose> + <refname>pfsockopen</refname> + <refpurpose>Open persistent Internet or Unix domain socket connection.</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <funcsynopsis> - <funcdef>int <function>syslog</function></funcdef> - <paramdef>int <parameter>priority</parameter></paramdef> - <paramdef>string <parameter>message</parameter></paramdef> + <funcsynopsis> + <funcdef>int <function>pfsockopen</function></funcdef> + <paramdef>string <parameter>hostname</parameter></paramdef> + <paramdef>int <parameter>port</parameter></paramdef> + <paramdef>int <parameter><optional>errno</optional></parameter></paramdef> + <paramdef>string <parameter><optional>errstr</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>timeout</optional></parameter></paramdef> </funcsynopsis> - <para> - <function>syslog</function> generates a log message that will be - distributed by the system logger. - <parameter>priority</parameter> is a combination of the facility - and the level, values for which are given in the next section. - The remaining argument is the message to send, except that the - two characters <literal>%m</literal> will be replaced by the - error message string (strerror) corresponding to the present - value of <errortype>errno</errortype>. - <para> - More information on the syslog facilities can be found in - the man pages for syslog on Unix machines. - <para> - On Windows NT, the syslog service is emulated using the - Event Log. - </refsect1> - </refentry> - <refentry id="function.closelog"> - <refnamediv> - <refname>closelog</refname> - <refpurpose>close connection to system logger</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>closelog</function></funcdef> - <void> - </funcsynopsis> <para> - <function>closelog</function> closes the descriptor being used to - write to the system logger. The use of - <function>closelog</function> is optional. + This function behaves exactly as <function>fsockopen</function> with the + difference that the connection is not closed after the script finishes. + It is the persistent version of <function>fsockopen</function>. </refsect1> </refentry> - <refentry id="function.debugger-on"> + <refentry id="function.set-socket-blocking"> <refnamediv> - <refname>debugger_on</refname> - <refpurpose>enable internal PHP debugger</refpurpose> + <refname>set_socket_blocking</refname> + <refpurpose>Set blocking/non-blocking mode on a socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> - <funcdef>int <function>debugger_on</function></funcdef> - <paramdef>string <parameter>address</parameter></paramdef> + <funcdef>int <function>set_socket_blocking</function></funcdef> + <paramdef>int <parameter>socket descriptor</parameter></paramdef> + <paramdef>int <parameter>mode</parameter></paramdef> </funcsynopsis> <para> - Enables the internal PHP debugger, connecting it to - <parameter>address</parameter>. The debugger is still under - development. + If <parameter>mode</parameter> is false, the given socket + descriptor will be switched to non-blocking mode, and if true, it + will be switched to blocking mode. This affects calls like + <function>fgets</function> that read from the socket. In + non-blocking mode an fgets() call will always return right away + while in blocking mode it will wait for data to become available + on the socket. + </refsect1> </refentry> - <refentry id="function.debugger-off"> + <refentry id="function.syslog"> <refnamediv> - <refname>debugger_off</refname> - <refpurpose>disable internal PHP debugger</refpurpose> + <refname>syslog</refname> + <refpurpose>generate a system log message</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> - <funcdef>int <function>debugger_off</function></funcdef> - <void> + <funcdef>int <function>syslog</function></funcdef> + <paramdef>int <parameter>priority</parameter></paramdef> + <paramdef>string <parameter>message</parameter></paramdef> </funcsynopsis> <para> - Disables the internal PHP debugger. The debugger is still under - development. + <function>syslog</function> generates a log message that will be + distributed by the system logger. + <parameter>priority</parameter> is a combination of the facility + and the level, values for which are given in the next section. + The remaining argument is the message to send, except that the + two characters <literal>%m</literal> will be replaced by the + error message string (strerror) corresponding to the present + value of <errortype>errno</errortype>. + <para> + More information on the syslog facilities can be found in + the man pages for syslog on Unix machines. + <para> + On Windows NT, the syslog service is emulated using the + Event Log. </refsect1> </refentry> Index: phpdoc/functions/var.sgml diff -u phpdoc/functions/var.sgml:1.3 phpdoc/functions/var.sgml:1.4 --- phpdoc/functions/var.sgml:1.3 Sat Jul 31 20:58:48 1999 +++ phpdoc/functions/var.sgml Mon Sep 6 00:22:22 1999 @@ -2,6 +2,58 @@ <title>Variable functions</title> <titleabbrev>Variables</titleabbrev> + <refentry id="function.doubleval"> + <refnamediv> + <refname>doubleval</refname> + <refpurpose>Get double value of a variable.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>double <function>doubleval</function></funcdef> + <paramdef>mixed <parameter>var</parameter></paramdef> + </funcsynopsis> + + <simpara> + Returns the double (floating point) value of <parameter>var</parameter>. + + <simpara> + <parameter>var</parameter> may be any scalar type. You cannot use + <function>doubleval</function> on arrays or objects. + + <simpara> + See also <function>intval</function>, + <function>strval</function>, + <function>settype</function> and <link + linkend="language.types.type-juggling">Type juggling</link>. + + </refsect1> + </refentry> + + + <refentry id="function.empty"> + <refnamediv> + <refname>empty</refname> + <refpurpose>determine whether a variable is set</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>empty</function></funcdef> + <paramdef>mixed <parameter>var</parameter></paramdef> + </funcsynopsis> + + <simpara> + Returns false if <parameter>var</parameter> is set and has a + non-empty or non-zero value; true otherwise. + + <simpara> + See also <function>isset</function> and <function>unset</function>. + + </refsect1> + </refentry> + + <refentry id="function.gettype"> <refnamediv> <refname>gettype</refname> @@ -65,58 +117,6 @@ </refsect1> </refentry> - - <refentry id="function.doubleval"> - <refnamediv> - <refname>doubleval</refname> - <refpurpose>Get double value of a variable.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>double <function>doubleval</function></funcdef> - <paramdef>mixed <parameter>var</parameter></paramdef> - </funcsynopsis> - - <simpara> - Returns the double (floating point) value of <parameter>var</parameter>. - - <simpara> - <parameter>var</parameter> may be any scalar type. You cannot use - <function>doubleval</function> on arrays or objects. - - <simpara> - See also <function>intval</function>, - <function>strval</function>, - <function>settype</function> and <link - linkend="language.types.type-juggling">Type juggling</link>. - - </refsect1> - </refentry> - - - <refentry id="function.empty"> - <refnamediv> - <refname>empty</refname> - <refpurpose>determine whether a variable is set</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>empty</function></funcdef> - <paramdef>mixed <parameter>var</parameter></paramdef> - </funcsynopsis> - - <simpara> - Returns false if <parameter>var</parameter> is set and has a - non-empty or non-zero value; true otherwise. - - <simpara> - See also <function>isset</function> and <function>unset</function>. - - </refsect1> - </refentry> - <refentry id="function.is-array"> <refnamediv>

« previous php.dev (#10596) next »