cvs: phpdoc /ja Translators /ja/functions dbx.xml image.xml
| From: | Rui Hirokawa | Date: | Sat, 14 Apr 2001 10:39:46 +0000 |
| Subject: | cvs: phpdoc /ja Translators /ja/functions dbx.xml image.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969334995@lists.php.net to get a copy of this message | ||
hirokawa Sat Apr 14 03:39:46 2001 EDT
Added files:
/phpdoc/ja/functions dbx.xml
Modified files:
/phpdoc/ja Translators
/phpdoc/ja/functions image.xml
Log:
added dbx.xml update translation.
Index: phpdoc/ja/Translators diff -u phpdoc/ja/Translators:1.21 phpdoc/ja/Translators:1.22 --- phpdoc/ja/Translators:1.21 Thu Apr 5 08:09:14 2001 +++ phpdoc/ja/Translators Sat Apr 14 03:39:45 2001 @@ -45,6 +45,7 @@ functions/dba.xml Rui Hirokawa functions/dbase.xml Rui Hirokawa functions/dbm.xml Michihide Hotta +functions/dbx.xml Rui Hirokawa functions/dir.xml Rui Hirokawa functions/dl.xml Chihiro Higuchi functions/domxml.xml Rui Hirokawa Index: phpdoc/ja/functions/image.xml diff -u phpdoc/ja/functions/image.xml:1.21 phpdoc/ja/functions/image.xml:1.22 --- phpdoc/ja/functions/image.xml:1.21 Sat Feb 3 17:05:22 2001 +++ phpdoc/ja/functions/image.xml Sat Apr 14 03:39:45 2001 @@ -118,6 +118,41 @@ </refsect1> </refentry> + <refentry id="function.imagealphablending"> + <refnamediv> + <refname>ImageAlphaBlending</refname> + <refpurpose>ã¤ã¡ã¼ã¸ãblendingã¢ã¼ãã«è¨å®ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagealphablending</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>bool <parameter>blendmode</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageAlphaBlending</function> ã«ããTrueColorã¤ã¡ã¼ã¸ã« + äºã¤ã®ç°ãªãæç»ã¢ã¼ãã使ç¨å¯è½ã¨ãªãã¾ããblendingã¢ã¼ãã§ã¯ã + å ¨ã¦ã®æç»é¢æ°ã«æå®ãããè²ã®alphaãã£ãã«è¦ç´ ã¨ãã¦ä½¿ç¨ããã + ä¾ãã°<function>ImageSetPixel</function>ã§ã¯èæ¯è²ã®ééå²åãå® + 義ãã¾ããçµæã¨ãã¦ãgd ã¯æç»è²ã«é¢ãã¦ãã®ç¹ã«åå¨ããè²ãèªå + çã«ãã¬ã³ãããã¤ã¡ã¼ã¸ã«çµæãä¿åãã¾ããçµæã®ãã¯ã»ã«ã¯ãé + æã«ãªãã¾ãããã¬ã³ãã¢ã¼ãã§ãªãå ´åãæç»è²ã¯å½¢å¼çã«ãã®ã¢ã« + ãã¡ãã£ãã«æ å ±ã«ã³ãã¼ãããåºåãã¯ã»ã«ãç½®æãã¾ãããã¬ã³ã + ã¢ã¼ãã¯ããã¬ããã¤ã¡ã¼ã¸ãæç»ãã¦ããéã«ã¯ä½¿ç¨ã§ãã¾ããã + <parameter>blendmode</parameter> ãtrueã®å ´åãblendingã¢ã¼ããæ + å¹ã«ãªããããã§ãªãå ´åã¯ç¡å¹ã¨ãªãã¾ãã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãPHP 4.0.6ã§è¿½å ãããGD 2.0.1ãå¿ è¦ããã¾ãã + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagearc"> <refnamediv> <refname>ImageArc</refname> @@ -139,10 +174,11 @@ </funcprototype> </funcsynopsis> <para> - <function>ImageArc</function>ã¯ãimã§ç¤ºãç»åä¸ã«<parameter>cx</parameter>ã - <parameter>cy</parameter>ãä¸å¿(å·¦ä¸ã0,0)ã¨ããé¨åæ¥åãæç»ãã¾ãã - <parameter>w</parameter>ã¨<parameter>h</parameter>ã¯ããããæ¥åã®å¹ 㨠- é«ããæå®ãã¾ãã䏿¹ãå§ç¹ã¨çµç¹ã¯å¼æ°<parameter>s</parameter>㨠+ <function>ImageArc</function>ã¯ãimã§ç¤ºãç»åä¸ã« + <parameter>cx</parameter>ã<parameter>cy</parameter>ãä¸å¿(å·¦ä¸ã + 0,0)ã¨ããé¨åæ¥åãæç»ãã¾ãã<parameter>w</parameter>㨠+ <parameter>h</parameter>ã¯ããããæ¥åã®å¹ ã¨é«ããæå®ãã¾ããä¸ + æ¹ãå§ç¹ã¨çµç¹ã¯å¼æ°<parameter>s</parameter>㨠<parameter>e</parameter>ã«ãã度(deg)ã§æå®ãã¾ãã </para> </refsect1> @@ -167,9 +203,10 @@ </funcprototype> </funcsynopsis> <para> - <function>ImageChar</function>ã¯ãç»å<parameter>im</parameter>ä¸ã® - 座æ¨<parameter>x</parameter>,<parameter>y</parameter>(å·¦ä¸ã0,0) ã« - <parameter>col</parameter>è²ã§<parameter>c</parameter>ã®æåã®æåãæç»ãã¾ãã + <function>ImageChar</function>ã¯ãç»å<parameter>im</parameter>ä¸ + ã®åº§æ¨<parameter>x</parameter>,<parameter>y</parameter>(å·¦ä¸ã + 0,0) ã« <parameter>col</parameter>è²ã§<parameter>c</parameter>ã® + æåã®æåãæç»ãã¾ãã font ãã1, 2, 3, 4 , 5 ã®å ´åã¯çµè¾¼ã¿ãã©ã³ãã使ç¨ããã¾ãã (ãã大ããªæ°åã¯ãã大ããªãã©ã³ãã«å¯¾å¿ãã¾ã) </para> @@ -335,6 +372,40 @@ </refsect1> </refentry> + <refentry id="function.imagecolorclosestalpha"> + <refnamediv> + <refname>ImageColorClosestAlpha</refname> + <refpurpose> + Get the index of the closest color to the specified color + alpha + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorclosestalpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the index of the color in the palette of the image which + is "closest" to the specified <acronym>RGB</acronym> value and <parameter>alpha</parameter> level. + </para> + <para> + See also <function>imagecolorexactalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecolorexact"> <refnamediv> <refname>ImageColorExact</refname> @@ -360,9 +431,46 @@ <para> <function>imagecolorclosest</function> ãåç §ä¸ããã </para> - </refsect1> - </refentry> + </refsect1> + </refentry> + <refentry id="function.imagecolorexactalpha"> + <refnamediv> + <refname>ImageColorExactAlpha</refname> + <refpurpose>Get the index of the specified color + alpha</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorexactalpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the index of the specified color+alpha in the palette of the + image. + </para> + <para> + If the color does not exist in the image's palette, -1 is + returned. + </para> + <para> + See also <function>imagecolorclosestalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecolorresolve"> <refnamediv> <refname>ImageColorResolve</refname> @@ -391,6 +499,164 @@ </refsect1> </refentry> + <refentry id="function.imageellipse"> + <refnamediv> + <refname>ImageEllipse</refname> + <refpurpose>Draw an ellipse</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imageellipse</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageEllipse</function> draws an ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by <parameter>im</parameter>. + <parameter>W</parameter> and <parameter>h</parameter> specifies the + ellipse's width and height respectively. The color of the ellipse is + specified by <parameter>color</parameter>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.2 or + later + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagefilledarc"> + <refnamediv> + <refname>ImageFilledArc</refname> + <refpurpose>Draw a partial ellipse and fill it</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagefilledarc</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>s</parameter></paramdef> + <paramdef>int <parameter>e</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + <paramdef>int <parameter>style</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageFilledArc</function> draws a partial ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by im. <parameter>W</parameter> + and <parameter>h</parameter> specifies the ellipse's width and + height respectively while the start and end points are specified + in degrees indicated by the <parameter>s</parameter> and + <parameter>e</parameter>. arguments. + <parameter>style</parameter> is a bitwise OR of the following possibilities: + <orderedlist> + <listitem><simpara>IMG_ARC_PIE</simpara></listitem> + <listitem><simpara>IMG_ARC_CHORD</simpara></listitem> + <listitem><simpara>IMG_ARC_NOFILL</simpara></listitem> + <listitem><simpara>IMG_ARC_EDGED</simpara></listitem> + </orderedlist> + IMG_ARC_PIE and IMG_ARC_CHORD are mutually exclusive; IMG_ARC_CHORD just + connects the starting and ending angles with a straight line, while + IMG_ARC_PIE produces a rounded edge. IMG_ARC_NOFILL indicates that the arc + or chord should be outlined, not filled. IMG_ARC_EDGED, used together with + IMG_ARC_NOFILL, indicates that the beginning and ending angles should be + connected to the center - this is a good way to outline (rather than fill) + a 'pie slice'. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagefilledellipse"> + <refnamediv> + <refname>ImageFilledEllipse</refname> + <refpurpose>Draw a filled ellipse</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagefilledellipse</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageFilledEllipse</function> draws an ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by <parameter>im</parameter>. + <parameter>W</parameter> and <parameter>h</parameter> specifies the + ellipse's width and height respectively. The ellipse is filled using + <parameter>color</parameter> + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagecolorresolvealpha"> + <refnamediv> + <refname>ImageColorResolveAlpha</refname> + <refpurpose> + Get the index of the specified color + alpha or its closest possible + alternative + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorresolvealpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </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> + <para> + See also <function>imagecolorclosestalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagegammacorrect"> <refnamediv> <refname>ImageGammaCorrect</refname> @@ -586,6 +852,95 @@ </refsect1> </refentry> + <refentry id="function.imagecopymerge"> + <refnamediv> + <refname>ImageCopyMerge</refname> + <refpurpose> + Copy and merge part of an image + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ImageCopyMerge</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> + <paramdef>int <parameter>pct</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>. + The two images will be merged according to <parameter>pct</parameter> + which can range from 0 to 100. When <parameter>pct</parameter> = 0, + no action is taken, when 100 this function behaves identically + to <function>ImageCopy</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.imagecopymergegray"> + <refnamediv> + <refname>ImageCopyMergeGray</refname> + <refpurpose> + Copy and merge part of an image with gray scale + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ImageCopyMergeGray</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> + <paramdef>int <parameter>pct</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + This function is identical to <function>ImageCopyMerge</function> except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + </para> + <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>. + The two images will be merged according to <parameter>pct</parameter> + which can range from 0 to 100. When <parameter>pct</parameter> = 0, + no action is taken, when 100 this function behaves identically + to <function>ImageCopy</function>. + </para> + <para> + This function is identical to <function>ImageCopyMerge</function> except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + </refsect1> + </refentry> + <refentry id="function.imagecopyresized"> <refnamediv> <refname>ImageCopyResized</refname> @@ -618,13 +973,65 @@ åä¸ã§ããã°)颿°ã¯é åã®ã³ãã¼ã«ä½¿ããã¨ãã§ãã¾ããã é åãéãªã£ãã¨ãã®çµæã¯äºæ¸¬ã§ãã¾ããã </para> + <para> + <function>ImageCopyResampled</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> + <refentry id="function.imagecopyresampled"> + <refnamediv> + <refname>ImageCopyResampled</refname> + <refpurpose>Copy and resize part of an image with resampling</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecopyresampled</function></funcdef> + <paramdef>resource <parameter>dst_im</parameter></paramdef> + <paramdef>resource <parameter>src_im</parameter></paramdef> + <paramdef>int <parameter>dstX</parameter></paramdef> + <paramdef>int <parameter>dstY</parameter></paramdef> + <paramdef>int <parameter>srcX</parameter></paramdef> + <paramdef>int <parameter>srcY</parameter></paramdef> + <paramdef>int <parameter>dstW</parameter></paramdef> + <paramdef>int <parameter>dstH</parameter></paramdef> + <paramdef>int <parameter>srcW</parameter></paramdef> + <paramdef>int <parameter>srcH</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageCopyResampled</function> copies a rectangular + portion of one image to another image, smoothly interpolating pixel + values so that, in particular, reducing the size of an image still + retains a great deal of clarity. + <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> + <para> + See also <function>ImageCopyResized</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecreate"> <refnamediv> <refname>ImageCreate</refname> - <refpurpose>æ°è¦ç»åã®ä½æ</refpurpose> + <refpurpose>ãã¬ããã使ç¨ããæ°è¦ç»åã®ä½æ</refpurpose> </refnamediv> <refsect1> <title>説æ</title> @@ -658,6 +1065,58 @@ </refsect1> </refentry> + <refentry id="function.imagecreatetruecolor"> + <refnamediv> + <refname>ImageCreateTrueColor</refname> + <refpurpose>Create a new true color image</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>imagecreatetruecolor</function></funcdef> + <paramdef>int <parameter>x_size</parameter></paramdef> + <paramdef>int <parameter>y_size</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageCreateTrueColor</function> returns an image identifier + representing a black image of size <parameter>x_size</parameter> + by <parameter>y_size</parameter>. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + <note><para>This function requires GD 2.0.1 or later</para></note> + </refsect1> + </refentry> + + <refentry id="function.imagetruecolortopalette"> + <refnamediv> + <refname>ImageTrueColorToPalette</refname> + <refpurpose>Convert a true color image to a palette image</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>imagetruecolortopalette</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageTrueColorToPalette</function> converts a truecolor image + to a palette image. The code for this function was originally drawn from + the Independent JPEG Group library code, which is excellent. The code + has been modified to preserve as much alpha channel information as + possible in the resulting palette, in addition to preserving colors as + well as possible. This does not work as well as might be hoped. It is + usually best to simply produce a truecolor output image instead, which + guarantees the highest output quality. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + <note><para>This function requires GD 2.0.1 or later</para></note> + </refsect1> + </refentry> + <refentry id="function.imagecreatefromgif"> <refnamediv> <refname>ImageCreateFromGif</refname> @@ -1898,6 +2357,106 @@ <function>imagecreate</function>ããã³ <function>imagecolorallocate</function>ãåèã«ãã¦ãã ããã </para> + </refsect1> + </refentry> + + <refentry id="function.imagesetbrush"> + <refnamediv> + <refname>ImageSetBrush</refname> + <refpurpose>Set the brush image for line drawing</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagesetbrush</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>resource <parameter>brush</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetBrush</function> sets the brush image to be + used by all line drawing functions (such as <function>ImageLine</function> + and <function>ImagePolygon</function>) when drawing with the special + colors IMG_COLOR_BRUSHED or IMG_COLOR_STYLEDBRUSHED. + </para> + <note> + <para> + You need not take special action when you are finished with a + brush, but if you + destroy the brush image, you must not use the IMG_COLOR_BRUSHED + or IMG_COLOR_STYLEDBRUSHED + colors until you have set a new brush image! + </para> + </note> + <note> + <para> + ãã®é¢æ°ã¯ãPHP 4.0.6 ã§è¿½å ããã¾ããã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagesettile"> + <refnamediv> + <refname>ImageSetTile</refname> + <refpurpose>Set the tile image for filling</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagesettile</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>resource <parameter>tile</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetTile</function> sets the tile image to be + used by all region filling functions (such as <function>ImageFill</function> + and <function>ImageFilledPolygon</function>) when filling with the special + color IMG_COLOR_TILED. + </para> + <para> + A tile is an image used to fill an area with a repeated pattern. <emphasis>Any</emphasis> + GD image can be used as a tile, and by setting the transparent color index of the tile + image with <function>ImageColorTransparent</function>, a tile allows certain parts + of the underlying area to shine through can be created. + </para> + <note> + <para>You need not take special action when you are finished with a tile, but if you + destroy the tile image, you must not use the IMG_COLOR_TILED color until you have + set a new tile image!</para> + </note> + <note><para>This function was added in PHP 4.0.6</para></note> + </refsect1> + </refentry> + + <refentry id="function.imagesetthickness"> + <refnamediv> + <refname>ImageSetThickness</refname> + <refpurpose>Set the thickness for line drawing</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>imagesetthickness</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>thickness</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetThickness</function> sets the thickness of the lines + drawn when drawing rectangles, polygons, ellipses etc. etc. to + <parameter>thickness</parameter> pixels. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> </refsect1> </refentry> Index: phpdoc/ja/functions/dbx.xml +++ phpdoc/ja/functions/dbx.xml <reference id="ref.dbx"> <title>dbx 颿°</title> <titleabbrev>dbx</titleabbrev> <partintro> <simpara> dbx ã¢ã¸ã¥ã¼ã«ã¯ããã¼ã¿ãã¼ã¹æ½è±¡åã¬ã¤ã¤ (db 'X'ããã ã 'X' 㯠ãµãã¼ãããããã¼ã¿ãã¼ã¹ã®ä¸ã¤ãæå³ãã¾ã)ã®ãã¨ã§ããdbx 颿° ã«ããããµãã¼ããããå ¨ã¦ã®ãã¼ã¿ãã¼ã¹ãåä¸ã®å¼åºè¡¨è¨ã«ããã¢ã¯ ã»ã¹ãããã¨ãå¯è½ã«ãªãã¾ãããããã®é¢æ°ãå©ç¨å¯è½ã«ããã«ã¯ã <option role="configure">--enable-dbx</option> ãªãã·ã§ã³ã使ç¨ã ã¦dbxãµãã¼ããæå¹ã«ããã¾ãã使ç¨ãããã¼ã¿ãã¼ã¹ã«é¢ãããªãã·ã§ ã³ãä¾ãã°ãMySQL ã®å ´å㯠<option role="configure">--with-mysql</option> ãæå®ã㦠PHPãã³ã³ãã¤ã« ããå¿ è¦ãããã¾ããdbx 颿°èªä½ã¯ããã¼ã¿ãã¼ã¹ã¸ã®ç´æ¥ã®ã¤ã³ã¿ã¼ ãã§ã¤ã¹ãæãã¾ãããããããã®ãã¼ã¿ãã¼ã¹ããµãã¼ãããããã«ä½¿ ç¨ãããã¢ã¸ã¥ã¼ã«ã¸ã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ãæãã¾ããdbxã¢ã¸ã¥ã¼ã«ã§ ãã¼ã¿ãã¼ã¹ã使ç¨å¯è½ã¨ããã«ã¯ããã®ã¢ã¸ã¥ã¼ã«ã PHPã«ãªã³ã¯ãã ãããã¼ããããå¿ è¦ãããããã®ãã¼ã¿ãã¼ã¹ã®ã¢ã¸ã¥ã¼ã«ã¯ãdbx㢠ã¸ã¥ã¼ã«ã«ãµãã¼ãããã¦ããå¿ è¦ãããã¾ããç¾å¨ãMySQLã PostgreSQLãODBCããµãã¼ãããã¦ããããã®ä»ã«ã¤ãã¦ã(叿ç観測 ã ã¨ã¾ããªã)追å ãããäºå®ã§ãã </simpara> <simpara> dbx ã«ãã¼ã¿ãã¼ã¹ã®ãµãã¼ãã追å ããããã®ããã¥ã¡ã³ãã¯ã <ulink url="&url.dbx.docs;">&url.dbx.docs;</ulink> ã«ããã¾ãã </simpara> </partintro> <refentry id="function.dbx-close"> <refnamediv> <refname>dbx_close</refname> <refpurpose>ãªã¼ãã³ãããæ¥ç¶/ãã¼ã¿ãã¼ã¹ãéãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>dbx_close</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«<literal>TRUE</literal>ãã¨ã©ã¼ã®éã« <literal>FALSE</literal>ãè¿ãã¾ãã </para> <example> <title><function>dbx_close</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password") or die ("Could not connect"); print("Connected successfully"); dbx_close($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> <para> <function>dbx_connect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-connect"> <refnamediv> <refname>dbx_connect</refname> <refpurpose>æ¥ç¶/ãã¼ã¿ãã¼ã¹ããªã¼ãã³ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>dbx_link_object <function>dbx_connect</function></funcdef> <paramdef>string <parameter>module</parameter></paramdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>string <parameter>database</parameter></paramdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> <paramdef>int <parameter><optional>persistent</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> è¿ãå¤: æåæã«dbx_link_objectãã¨ã©ã¼æã« <literal>FALSE</literal>ãæ¥ç¶ã確ç«ããããããã¼ã¿ãã¼ã¹ã鏿 ã§ããªãå ´åã§ãããã®é¢æ°ã¯ dbx_link_object ãè¿ãã¾ãããã©ã¡ã¼ ã¿<parameter>persistent</parameter>ã«DBX_PERSISTENTãè¨å®ããã㨠ãã§ãããã®å ´åã«ã¯ãæç¶çæ¥ç¶ã使ããã¾ãã </para> <para> 使ç¨å¯è½ãªã¢ã¸ã¥ã¼ã«åã以ä¸ã«ç¤ºãã¾ãããã ããã¢ã¸ã¥ã¼ã«ãå®é ã«ãã¼ãããã¦ããå ´åã«ã®ã¿åä½ãããã¨ã«æ³¨æãã¦ä¸ããã </para> <para> <itemizedlist> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 1: "mysql" </simpara> </listitem> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 2: "odbc" </simpara> </listitem> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 3: "pgsql" </simpara> </listitem> </itemizedlist> </para> <para> pgsql ãµãã¼ãã¯ãã¾ã å®é¨çã§ãããã½ã¼ã¹ãã¡ã¤ã«ã®ä¸ã¤ãèªåã§ ä¿®æ£ããå¾ã§ pgsql ã¢ã¸ã¥ã¼ã«ãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ããä¿®æ£ ãè¡ããªãã¨ã¯ã¨ãªæ¯ã« PostgreSQLã®è¦åãçºçãã¦ãã¾ãã¾ãã </para> <para> dbx_link_object ã¯ã3ã¤ã®ã¡ã³ã 'handle'ã'module'ã'database' ã æãã¾ããã¡ã³ã 'database'ã¯ãç¾å¨é¸æããã¦ãããã¼ã¿ãã¼ã¹ã®å åã§ããã¡ã³ã'module'ã¯ãdbxã®å é¨ã®ã¿ã§ä½¿ç¨ãããä¸è¨ã®æå¹ãªã¢ ã¸ã¥ã¼ã«çªå·ã§ããã¡ã³ã 'handle' ã¯ããã¼ã¿ãã¼ã¹æ¥ç¶ã«é¢ããæ å¹ãªãã³ãã«ã§ã(å¿ è¦ã«å¿ãã¦)ã¢ã¸ã¥ã¼ã«å°ç¨é¢æ°ã§ä½¿ç¨ããã¾ãã ä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password"); mysql_close ($link->handle); // dbx_close($link) ã®æ¹ãè¯ãããããã¾ãã ?> </programlisting> </informalexample> </para> <para> ãã©ã¡ã¼ã¿hostãdatabaseãusernameãpasswordãå¿ è¦ã§ãããå¸¸ã«æ½ 象åã¢ã¸ã¥ã¼ã«ã§ä½¿ç¨ãããããã§ã¯ããã¾ããã </para> <para> <example> <title><function>dbx_connect</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("odbc", "", "db", "username", "password", DBX_PERSISTENT) or die ("æ¥ç¶ã§ãã¾ãã"); print ("æ¥ç¶ã«æåãã¾ãã"); dbx_close ($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> </para> <para> <function>dbx_close</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-error"> <refnamediv> <refname>dbx_error</refname> <refpurpose> (æ¥ç¶æã ãã§ãªã)使ç¨ããã¢ã¸ã¥ã¼ã«ã®ææ°ã®é¢æ°ã³ã¼ã«ã«ããã㨠ã©ã¼ã¡ãã»ã¼ã¸ãåºåãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>string <function>dbx_error</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> ã¢ã¸ã¥ã¼ã«(ä¾ãã° mysql-module)ã®ç´è¿ã®é¢æ°ã³ã¼ã«ããã¨ã©ã¼ã¡ãã»ã¼ ã¸ãæããæååãè¿ãã¾ããåãã¢ã¸ã¥ã¼ã«ã«è¤æ°ã®æ¥ç¶ãããå ´åã æå¾ã®ã¨ã©ã¼ã®ã¿ãåå¾ããã¾ããå¥ã®ã¢ã¸ã¥ã¼ã«ã«æ¥ç¶ãããå ´åã (ãªã³ã¯ãã©ã¡ã¼ã¿ã§)æå®ããã¢ã¸ã¥ã¼ã«ã«é¢ããç´è¿ã®ã¨ã©ã¼ã®ã¿ã è¿ããã¾ããODBCã¢ã¸ã¥ã¼ã«ã¯ç¾å¨ã¨ã©ã¼åºå颿°ããµãã¼ããã¦ã㪠ããã¨ã«æ³¨æãã¦ä¸ããã </para> <example> <title><function>dbx_error</function>ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "select id from nonexistingtbl"); if ($result==0) { echo dbx_error ($link); } dbx_close ($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> </refsect1> </refentry> <refentry id="function.dbx-query"> <refnamediv> <refname>dbx_query</refname> <refpurpose>ã¯ã¨ãªãéä¿¡ãã(ããå ´åã«ã¯)çµæãå ¨ã¦åå¾ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>dbx_result_object <function>dbx_query</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> <paramdef>string <parameter>sql_statement</parameter></paramdef> <paramdef>long <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«dbx_result_objectã¾ãã¯1ãè¿ãã¾ããçµæãªãã¸ã§ã¯ãã¯ã SQLå½ä»¤ãçµæãè¿ãå ´åã«ã®ã¿è¿ããã¾ããã¨ã©ã¼ã®å ´åã«ã¯ã0ãè¿ ãã¾ãããã©ã¡ã¼ã¿ <parameter>flags</parameter> ã¯ãè¿ãããæ å ± ã®éãå¶å¾¡ããããã«ä½¿ç¨ããã¾ãã宿° DBX_RESULT_INFO, DBX_RESULT_INDEX, DBX_RESULT_ASSOC ã¾ãã¯ãããã®è«çåãçµã¿åã ãããã¨ãå¯è½ã§ããDBX_RESULT_INFO ãæå®ããã¨ãã£ã¼ã«ãåãã ã³ãã£ã¼ã«ãåã®ãããªã«ã©ã ã«é¢ããæ å ±ãæä¾ããã¾ãã DBX_RESULT_INDEX ã«ãããçµæã¯(data[2][3]ã®ãããªããã ãã2ã¯ã¬ ã³ã¼ãçªå·ã3ã¯ã«ã©ã çªå·)2次å ã®é åã§è¿ããã¾ãããã ããæåã® ã¬ã³ã¼ãããã³ã«ã©ã çªå·ã¯0ããå§ã¾ãã¾ãã DBX_RESULT_ASSOC ã«ããããã£ã¼ã«ãåã«ã«ã©ã æ·»åãé¢é£ä»ãããã¾ ãããã©ã¡ã¼ã¿<parameter>flags</parameter> ã«ããã DBX_RESULT_INDEXã¯å¸¸ã«è¿ããããã¨ã«æ³¨æãã¦ä¸ããã DBX_RESULT_ASSOC ãæå®ãããå ´åãDBX_RESULT_INFOã¯æå®ãããªã å ´åã§ãè¿ããã¾ããããã¯ãDBX_RESULT_INDEX,DBX_RESULT_INDEX | DBX_RESULT_INFO ããã³ DBX_RESULT_INDEX | DBX_RESULT_INFO | DBX_RESULT_ASSOC ã®çµã¿åããã®ã¿ãçµæçã«ä½¿ç¨å¯è½ã§ãããã¨ãæ å³ãã¾ãã <parameter>flags</parameter> ãæå®ãããªãå ´åããã® æå¾ã®çµã¿åãããããã©ã«ãã§ãã飿³é åã§åç §ãããçµæã¯ãæ·» åçªå·ã®çµæã¸ã®ãªãã¡ã¬ã³ã¹ã§ãããã®ããã <literal>data[0][0]</literal> ãä¿®æ£ããå ´åã <literal>data[0]['fieldnameforfirstcolumn']</literal> ãåæã«ä¿® æ£ããã¾ãã </para> <para> dbx_result_object ã«ã¯ã5ã¤ã®ã¡ã³ããããã¾ãã (<parameter>flags</parameter>ã«ãã£ã¦ã¯4ã¤ã®å ´åãããã¾ã)ããã ã¯ã'handle', 'cols', 'rows', 'info'(ãªãã·ã§ã³), 'data'ã§ãã handle ã¯ãæå®ããã¢ã¸ã¥ã¼ã«ã«é¢ããæå¹ãªçµæIDã§ãããæ¬¡ã®ãã ã«ã¢ã¸ã¥ã¼ã«å°ç¨é¢æ°ã§ä½¿ç¨å¯è½ã§ãã </para> <para> <informalexample role="php"> <programlisting> $result = dbx_query ($link, "SELECT id FROM tbl"); mysql_field_len ($result->handle, 0); </programlisting> </informalexample> </para> <para> ã¡ã³ã cols ããã³ rows ã¯ãããããã«ã©ã (ã¾ãã¯ãã£ã¼ã«ã)çªå· ããã³è¡(ã¾ãã¯ã¬ã³ã¼ã)çªå·ã§ããä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> $result = dbx_query ($link, "SELECT id FROM tbl"); echo "çµæã®ãµã¤ãº: " . $result->rows . " x " . $result->cols . "<br>\n"; </programlisting> </informalexample> </para> <para> ã¡ã³ãinfoã¯ãDBX_RESULT_INFOã¾ãã¯DBX_RESULT_ASSOCã <parameter>flags</parameter>ãã©ã¡ã¼ã¿ã§æå®ãããå ´åã®ã¿è¿ãã ã¾ãããã®ã¡ã³ãã¯2次å é åã§ãã«ã©ã æ å ±ãåå¾ããããã«äºã¤ã®ã¬ ã³ã¼ã("name"ã¨"type")ãæãã¦ãã¾ããä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> $result = dbx_query ($link, "SELECT id FROM tbl"); echo "ã«ã©ã å: " . $result->info["name"][0] . "<br>\n"; echo "ã«ã©ã å: " . $result->info["type"][0] . "<br>\n"; </programlisting> </informalexample> </para> <para> ã¡ã³ãdataã«ã¯ãå®éã®çµæãå«ã¾ãã¾ããããã¦ãã«ã©ã åãåæ§ã« é¢é£ãã¦ãã¾ããDBX_RESULT_ASSOCãè¨å®ãããå ´åã <literal>$result->data[2]["fieldname"]</literal>ã使ç¨ãããã¨ã å¯è½ã§ãã </para> <example> <title><function>dbx_query</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl"); if ($result==0) echo "ã¯ã¨ãªã«å¤±æãã¾ãã\n<br>"; elseif ($result==1) { echo "ã¯ã¨ãªã®å®è¡ã«æåãã¾ãã\n<br>"; } else { $rows=$result->rows; $cols=$result->cols; echo "<p>ãã¼ãã«æ¬¡å : {$result->rows} x {$result->cols}<br><table border=1>\n"; echo "<tr>"; for ($col=0; $col<$cols; ++$col) { echo "<td>-{$result->info["name"][$col]}-<br>-{$result->info["type"][$col]}-</td>"; } echo "</tr>\n"; for ($row=0; $row<$rows; ++$row){ echo "<tr>"; for ($col=0; $col<$cols; ++$col) { echo "<td>-{$result->data[$row][$col]}-</td>"; } echo "</tr>\n"; } echo "</table><p>\n"; echo "ãã¼ãã«æ¬¡å : {$result->rows} x id, parentid, description<br><table border=1>\n"; for ($row=0; $row<$rows; ++$row) { echo "<tr>"; echo "<td>-{$result->data[$row]["id"]}-</td>"; echo "<td>-{$result->data[$row]["parentid"]}-</td>"; echo "<td>-{$result->data[$row]["description"]}-</td>"; echo "</tr>\n"; } echo "</table><p>\n"; } dbx_close($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> <para> <function>dbx_connect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-sort"> <refnamediv> <refname>dbx_sort</refname> <refpurpose> ã«ã¹ã¿ãã¤ãºãããsort颿°ã«ãããdbx_queryããçµæãã½ã¼ããã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>dbx_sort</function></funcdef> <paramdef>dbx_result_object <parameter>result</parameter></paramdef> <paramdef>string <parameter>user_compare_function</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«<literal>TRUE</literal>ãã¨ã©ã¼æã« <literal>FALSE</literal>ãè¿ãã¾ãã </para> <example> <title><function>dbx_sort</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) $rv = dbx_cmp_asc ($a, $b, "id"); return $rv; } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯ãidã§ã½ã¼ãããã¦ãã¾ã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidã§ã½ã¼ããããç¶ãã¦ãidã§ã½ã¼ãããã¾ã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_cmp_asc</function> ããã³ <function>dbx_cmp_desc</function> ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-cmp-asc"> <refnamediv> <refname>dbx_cmp_asc</refname> <refpurpose> æé ã«ã½ã¼ãããããã«äºã¤ã®ã¬ã³ã¼ããæ¯è¼ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>int <function>dbx_cmp_asc</function></funcdef> <paramdef>array <parameter>row_a</parameter></paramdef> <paramdef>array <parameter>row_b</parameter></paramdef> <paramdef>string <parameter>columnname_or_index</parameter></paramdef> </funcprototype> </funcsynopsis> <para> row_a[$columnname_or_index] ã row_b[$columnname_or_index] ã«çã ãå ´åã« 0ããã大ããå ´åã« 1ãããå°ããå ´åã« -1 ãè¿ãã¾ãã </para> <example> <title><function>dbx_cmp_asc</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) { $rv = dbx_cmp_asc ($a, $b, "id"); return $rv; } } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯idã§ã½ã¼ãããã¾ãã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidããã¦idã§ã½ã¼ãããã¾ãã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_sort</function>ããã³ <function>dbx_cmp_desc</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-cmp-desc"> <refnamediv> <refname>dbx_cmp_desc</refname> <refpurpose> éé ã«ã½ã¼ãããããã«äºã¤ã®ã¬ã³ã¼ããæ¯è¼ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>int <function>dbx_cmp_desc</function></funcdef> <paramdef>array <parameter>row_a</parameter></paramdef> <paramdef>array <parameter>row_b</parameter></paramdef> <paramdef>string <parameter>columnname_or_index</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> row_a[$columnname_or_index] ã row_b[$columnname_or_index] ã«çã ãå ´åã« 0ããã大ããå ´åã«-1ãããå°ããå ´åã«1ãè¿ãã¾ãã </para> <example> <title><function>dbx_cmp_desc</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) { $rv = dbx_cmp_asc($a, $b, "id"); return $rv; } } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯idã§ã½ã¼ãããã¾ãã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidããã¦idã§ã½ã¼ãããã¾ãã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_sort</function>ããã³ <function>dbx_cmp_asc</function>ãåç §ä¸ããã </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->
Index: phpdoc/ja/Translators diff -u phpdoc/ja/Translators:1.21 phpdoc/ja/Translators:1.22 --- phpdoc/ja/Translators:1.21 Thu Apr 5 08:09:14 2001 +++ phpdoc/ja/Translators Sat Apr 14 03:39:45 2001 @@ -45,6 +45,7 @@ functions/dba.xml Rui Hirokawa functions/dbase.xml Rui Hirokawa functions/dbm.xml Michihide Hotta +functions/dbx.xml Rui Hirokawa functions/dir.xml Rui Hirokawa functions/dl.xml Chihiro Higuchi functions/domxml.xml Rui Hirokawa Index: phpdoc/ja/functions/image.xml diff -u phpdoc/ja/functions/image.xml:1.21 phpdoc/ja/functions/image.xml:1.22 --- phpdoc/ja/functions/image.xml:1.21 Sat Feb 3 17:05:22 2001 +++ phpdoc/ja/functions/image.xml Sat Apr 14 03:39:45 2001 @@ -118,6 +118,41 @@ </refsect1> </refentry> + <refentry id="function.imagealphablending"> + <refnamediv> + <refname>ImageAlphaBlending</refname> + <refpurpose>ã¤ã¡ã¼ã¸ãblendingã¢ã¼ãã«è¨å®ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagealphablending</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>bool <parameter>blendmode</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageAlphaBlending</function> ã«ããTrueColorã¤ã¡ã¼ã¸ã« + äºã¤ã®ç°ãªãæç»ã¢ã¼ãã使ç¨å¯è½ã¨ãªãã¾ããblendingã¢ã¼ãã§ã¯ã + å ¨ã¦ã®æç»é¢æ°ã«æå®ãããè²ã®alphaãã£ãã«è¦ç´ ã¨ãã¦ä½¿ç¨ããã + ä¾ãã°<function>ImageSetPixel</function>ã§ã¯èæ¯è²ã®ééå²åãå® + 義ãã¾ããçµæã¨ãã¦ãgd ã¯æç»è²ã«é¢ãã¦ãã®ç¹ã«åå¨ããè²ãèªå + çã«ãã¬ã³ãããã¤ã¡ã¼ã¸ã«çµæãä¿åãã¾ããçµæã®ãã¯ã»ã«ã¯ãé + æã«ãªãã¾ãããã¬ã³ãã¢ã¼ãã§ãªãå ´åãæç»è²ã¯å½¢å¼çã«ãã®ã¢ã« + ãã¡ãã£ãã«æ å ±ã«ã³ãã¼ãããåºåãã¯ã»ã«ãç½®æãã¾ãããã¬ã³ã + ã¢ã¼ãã¯ããã¬ããã¤ã¡ã¼ã¸ãæç»ãã¦ããéã«ã¯ä½¿ç¨ã§ãã¾ããã + <parameter>blendmode</parameter> ãtrueã®å ´åãblendingã¢ã¼ããæ + å¹ã«ãªããããã§ãªãå ´åã¯ç¡å¹ã¨ãªãã¾ãã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãPHP 4.0.6ã§è¿½å ãããGD 2.0.1ãå¿ è¦ããã¾ãã + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagearc"> <refnamediv> <refname>ImageArc</refname> @@ -139,10 +174,11 @@ </funcprototype> </funcsynopsis> <para> - <function>ImageArc</function>ã¯ãimã§ç¤ºãç»åä¸ã«<parameter>cx</parameter>ã - <parameter>cy</parameter>ãä¸å¿(å·¦ä¸ã0,0)ã¨ããé¨åæ¥åãæç»ãã¾ãã - <parameter>w</parameter>ã¨<parameter>h</parameter>ã¯ããããæ¥åã®å¹ 㨠- é«ããæå®ãã¾ãã䏿¹ãå§ç¹ã¨çµç¹ã¯å¼æ°<parameter>s</parameter>㨠+ <function>ImageArc</function>ã¯ãimã§ç¤ºãç»åä¸ã« + <parameter>cx</parameter>ã<parameter>cy</parameter>ãä¸å¿(å·¦ä¸ã + 0,0)ã¨ããé¨åæ¥åãæç»ãã¾ãã<parameter>w</parameter>㨠+ <parameter>h</parameter>ã¯ããããæ¥åã®å¹ ã¨é«ããæå®ãã¾ããä¸ + æ¹ãå§ç¹ã¨çµç¹ã¯å¼æ°<parameter>s</parameter>㨠<parameter>e</parameter>ã«ãã度(deg)ã§æå®ãã¾ãã </para> </refsect1> @@ -167,9 +203,10 @@ </funcprototype> </funcsynopsis> <para> - <function>ImageChar</function>ã¯ãç»å<parameter>im</parameter>ä¸ã® - 座æ¨<parameter>x</parameter>,<parameter>y</parameter>(å·¦ä¸ã0,0) ã« - <parameter>col</parameter>è²ã§<parameter>c</parameter>ã®æåã®æåãæç»ãã¾ãã + <function>ImageChar</function>ã¯ãç»å<parameter>im</parameter>ä¸ + ã®åº§æ¨<parameter>x</parameter>,<parameter>y</parameter>(å·¦ä¸ã + 0,0) ã« <parameter>col</parameter>è²ã§<parameter>c</parameter>ã® + æåã®æåãæç»ãã¾ãã font ãã1, 2, 3, 4 , 5 ã®å ´åã¯çµè¾¼ã¿ãã©ã³ãã使ç¨ããã¾ãã (ãã大ããªæ°åã¯ãã大ããªãã©ã³ãã«å¯¾å¿ãã¾ã) </para> @@ -335,6 +372,40 @@ </refsect1> </refentry> + <refentry id="function.imagecolorclosestalpha"> + <refnamediv> + <refname>ImageColorClosestAlpha</refname> + <refpurpose> + Get the index of the closest color to the specified color + alpha + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorclosestalpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the index of the color in the palette of the image which + is "closest" to the specified <acronym>RGB</acronym> value and <parameter>alpha</parameter> level. + </para> + <para> + See also <function>imagecolorexactalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecolorexact"> <refnamediv> <refname>ImageColorExact</refname> @@ -360,9 +431,46 @@ <para> <function>imagecolorclosest</function> ãåç §ä¸ããã </para> - </refsect1> - </refentry> + </refsect1> + </refentry> + <refentry id="function.imagecolorexactalpha"> + <refnamediv> + <refname>ImageColorExactAlpha</refname> + <refpurpose>Get the index of the specified color + alpha</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorexactalpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the index of the specified color+alpha in the palette of the + image. + </para> + <para> + If the color does not exist in the image's palette, -1 is + returned. + </para> + <para> + See also <function>imagecolorclosestalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecolorresolve"> <refnamediv> <refname>ImageColorResolve</refname> @@ -391,6 +499,164 @@ </refsect1> </refentry> + <refentry id="function.imageellipse"> + <refnamediv> + <refname>ImageEllipse</refname> + <refpurpose>Draw an ellipse</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imageellipse</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageEllipse</function> draws an ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by <parameter>im</parameter>. + <parameter>W</parameter> and <parameter>h</parameter> specifies the + ellipse's width and height respectively. The color of the ellipse is + specified by <parameter>color</parameter>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.2 or + later + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagefilledarc"> + <refnamediv> + <refname>ImageFilledArc</refname> + <refpurpose>Draw a partial ellipse and fill it</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagefilledarc</function></funcdef> + <paramdef>int <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>s</parameter></paramdef> + <paramdef>int <parameter>e</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + <paramdef>int <parameter>style</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageFilledArc</function> draws a partial ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by im. <parameter>W</parameter> + and <parameter>h</parameter> specifies the ellipse's width and + height respectively while the start and end points are specified + in degrees indicated by the <parameter>s</parameter> and + <parameter>e</parameter>. arguments. + <parameter>style</parameter> is a bitwise OR of the following possibilities: + <orderedlist> + <listitem><simpara>IMG_ARC_PIE</simpara></listitem> + <listitem><simpara>IMG_ARC_CHORD</simpara></listitem> + <listitem><simpara>IMG_ARC_NOFILL</simpara></listitem> + <listitem><simpara>IMG_ARC_EDGED</simpara></listitem> + </orderedlist> + IMG_ARC_PIE and IMG_ARC_CHORD are mutually exclusive; IMG_ARC_CHORD just + connects the starting and ending angles with a straight line, while + IMG_ARC_PIE produces a rounded edge. IMG_ARC_NOFILL indicates that the arc + or chord should be outlined, not filled. IMG_ARC_EDGED, used together with + IMG_ARC_NOFILL, indicates that the beginning and ending angles should be + connected to the center - this is a good way to outline (rather than fill) + a 'pie slice'. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagefilledellipse"> + <refnamediv> + <refname>ImageFilledEllipse</refname> + <refpurpose>Draw a filled ellipse</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagefilledellipse</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>cx</parameter></paramdef> + <paramdef>int <parameter>cy</parameter></paramdef> + <paramdef>int <parameter>w</parameter></paramdef> + <paramdef>int <parameter>h</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageFilledEllipse</function> draws an ellipse centered at + <parameter>cx</parameter>, <parameter>cy</parameter> (top left is + 0, 0) in the image represented by <parameter>im</parameter>. + <parameter>W</parameter> and <parameter>h</parameter> specifies the + ellipse's width and height respectively. The ellipse is filled using + <parameter>color</parameter> + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagecolorresolvealpha"> + <refnamediv> + <refname>ImageColorResolveAlpha</refname> + <refpurpose> + Get the index of the specified color + alpha or its closest possible + alternative + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecolorresolvealpha</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter>alpha</parameter></paramdef> + </funcprototype> + </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> + <para> + See also <function>imagecolorclosestalpha</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagegammacorrect"> <refnamediv> <refname>ImageGammaCorrect</refname> @@ -586,6 +852,95 @@ </refsect1> </refentry> + <refentry id="function.imagecopymerge"> + <refnamediv> + <refname>ImageCopyMerge</refname> + <refpurpose> + Copy and merge part of an image + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ImageCopyMerge</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> + <paramdef>int <parameter>pct</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>. + The two images will be merged according to <parameter>pct</parameter> + which can range from 0 to 100. When <parameter>pct</parameter> = 0, + no action is taken, when 100 this function behaves identically + to <function>ImageCopy</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.imagecopymergegray"> + <refnamediv> + <refname>ImageCopyMergeGray</refname> + <refpurpose> + Copy and merge part of an image with gray scale + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ImageCopyMergeGray</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> + <paramdef>int <parameter>pct</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + This function is identical to <function>ImageCopyMerge</function> except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + </para> + <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>. + The two images will be merged according to <parameter>pct</parameter> + which can range from 0 to 100. When <parameter>pct</parameter> = 0, + no action is taken, when 100 this function behaves identically + to <function>ImageCopy</function>. + </para> + <para> + This function is identical to <function>ImageCopyMerge</function> except + that when merging it preservese the hue of the source by converting + the destination pixels to gray scale before the copy operation. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + </refsect1> + </refentry> + <refentry id="function.imagecopyresized"> <refnamediv> <refname>ImageCopyResized</refname> @@ -618,13 +973,65 @@ åä¸ã§ããã°)颿°ã¯é åã®ã³ãã¼ã«ä½¿ããã¨ãã§ãã¾ããã é åãéãªã£ãã¨ãã®çµæã¯äºæ¸¬ã§ãã¾ããã </para> + <para> + <function>ImageCopyResampled</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> + <refentry id="function.imagecopyresampled"> + <refnamediv> + <refname>ImageCopyResampled</refname> + <refpurpose>Copy and resize part of an image with resampling</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagecopyresampled</function></funcdef> + <paramdef>resource <parameter>dst_im</parameter></paramdef> + <paramdef>resource <parameter>src_im</parameter></paramdef> + <paramdef>int <parameter>dstX</parameter></paramdef> + <paramdef>int <parameter>dstY</parameter></paramdef> + <paramdef>int <parameter>srcX</parameter></paramdef> + <paramdef>int <parameter>srcY</parameter></paramdef> + <paramdef>int <parameter>dstW</parameter></paramdef> + <paramdef>int <parameter>dstH</parameter></paramdef> + <paramdef>int <parameter>srcW</parameter></paramdef> + <paramdef>int <parameter>srcH</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageCopyResampled</function> copies a rectangular + portion of one image to another image, smoothly interpolating pixel + values so that, in particular, reducing the size of an image still + retains a great deal of clarity. + <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> + <para> + See also <function>ImageCopyResized</function>. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.imagecreate"> <refnamediv> <refname>ImageCreate</refname> - <refpurpose>æ°è¦ç»åã®ä½æ</refpurpose> + <refpurpose>ãã¬ããã使ç¨ããæ°è¦ç»åã®ä½æ</refpurpose> </refnamediv> <refsect1> <title>説æ</title> @@ -658,6 +1065,58 @@ </refsect1> </refentry> + <refentry id="function.imagecreatetruecolor"> + <refnamediv> + <refname>ImageCreateTrueColor</refname> + <refpurpose>Create a new true color image</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>imagecreatetruecolor</function></funcdef> + <paramdef>int <parameter>x_size</parameter></paramdef> + <paramdef>int <parameter>y_size</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageCreateTrueColor</function> returns an image identifier + representing a black image of size <parameter>x_size</parameter> + by <parameter>y_size</parameter>. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + <note><para>This function requires GD 2.0.1 or later</para></note> + </refsect1> + </refentry> + + <refentry id="function.imagetruecolortopalette"> + <refnamediv> + <refname>ImageTrueColorToPalette</refname> + <refpurpose>Convert a true color image to a palette image</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>imagetruecolortopalette</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageTrueColorToPalette</function> converts a truecolor image + to a palette image. The code for this function was originally drawn from + the Independent JPEG Group library code, which is excellent. The code + has been modified to preserve as much alpha channel information as + possible in the resulting palette, in addition to preserving colors as + well as possible. This does not work as well as might be hoped. It is + usually best to simply produce a truecolor output image instead, which + guarantees the highest output quality. + </para> + <note><para>This function was added in PHP 4.0.6</para></note> + <note><para>This function requires GD 2.0.1 or later</para></note> + </refsect1> + </refentry> + <refentry id="function.imagecreatefromgif"> <refnamediv> <refname>ImageCreateFromGif</refname> @@ -1898,6 +2357,106 @@ <function>imagecreate</function>ããã³ <function>imagecolorallocate</function>ãåèã«ãã¦ãã ããã </para> + </refsect1> + </refentry> + + <refentry id="function.imagesetbrush"> + <refnamediv> + <refname>ImageSetBrush</refname> + <refpurpose>Set the brush image for line drawing</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagesetbrush</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>resource <parameter>brush</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetBrush</function> sets the brush image to be + used by all line drawing functions (such as <function>ImageLine</function> + and <function>ImagePolygon</function>) when drawing with the special + colors IMG_COLOR_BRUSHED or IMG_COLOR_STYLEDBRUSHED. + </para> + <note> + <para> + You need not take special action when you are finished with a + brush, but if you + destroy the brush image, you must not use the IMG_COLOR_BRUSHED + or IMG_COLOR_STYLEDBRUSHED + colors until you have set a new brush image! + </para> + </note> + <note> + <para> + ãã®é¢æ°ã¯ãPHP 4.0.6 ã§è¿½å ããã¾ããã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.imagesettile"> + <refnamediv> + <refname>ImageSetTile</refname> + <refpurpose>Set the tile image for filling</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>imagesettile</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>resource <parameter>tile</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetTile</function> sets the tile image to be + used by all region filling functions (such as <function>ImageFill</function> + and <function>ImageFilledPolygon</function>) when filling with the special + color IMG_COLOR_TILED. + </para> + <para> + A tile is an image used to fill an area with a repeated pattern. <emphasis>Any</emphasis> + GD image can be used as a tile, and by setting the transparent color index of the tile + image with <function>ImageColorTransparent</function>, a tile allows certain parts + of the underlying area to shine through can be created. + </para> + <note> + <para>You need not take special action when you are finished with a tile, but if you + destroy the tile image, you must not use the IMG_COLOR_TILED color until you have + set a new tile image!</para> + </note> + <note><para>This function was added in PHP 4.0.6</para></note> + </refsect1> + </refentry> + + <refentry id="function.imagesetthickness"> + <refnamediv> + <refname>ImageSetThickness</refname> + <refpurpose>Set the thickness for line drawing</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>imagesetthickness</function></funcdef> + <paramdef>resource <parameter>im</parameter></paramdef> + <paramdef>int <parameter>thickness</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>ImageSetThickness</function> sets the thickness of the lines + drawn when drawing rectangles, polygons, ellipses etc. etc. to + <parameter>thickness</parameter> pixels. + </para> + <note> + <para> + This function was added in PHP 4.0.6 and requires GD 2.0.1 or + later + </para> + </note> </refsect1> </refentry> Index: phpdoc/ja/functions/dbx.xml +++ phpdoc/ja/functions/dbx.xml <reference id="ref.dbx"> <title>dbx 颿°</title> <titleabbrev>dbx</titleabbrev> <partintro> <simpara> dbx ã¢ã¸ã¥ã¼ã«ã¯ããã¼ã¿ãã¼ã¹æ½è±¡åã¬ã¤ã¤ (db 'X'ããã ã 'X' 㯠ãµãã¼ãããããã¼ã¿ãã¼ã¹ã®ä¸ã¤ãæå³ãã¾ã)ã®ãã¨ã§ããdbx 颿° ã«ããããµãã¼ããããå ¨ã¦ã®ãã¼ã¿ãã¼ã¹ãåä¸ã®å¼åºè¡¨è¨ã«ããã¢ã¯ ã»ã¹ãããã¨ãå¯è½ã«ãªãã¾ãããããã®é¢æ°ãå©ç¨å¯è½ã«ããã«ã¯ã <option role="configure">--enable-dbx</option> ãªãã·ã§ã³ã使ç¨ã ã¦dbxãµãã¼ããæå¹ã«ããã¾ãã使ç¨ãããã¼ã¿ãã¼ã¹ã«é¢ãããªãã·ã§ ã³ãä¾ãã°ãMySQL ã®å ´å㯠<option role="configure">--with-mysql</option> ãæå®ã㦠PHPãã³ã³ãã¤ã« ããå¿ è¦ãããã¾ããdbx 颿°èªä½ã¯ããã¼ã¿ãã¼ã¹ã¸ã®ç´æ¥ã®ã¤ã³ã¿ã¼ ãã§ã¤ã¹ãæãã¾ãããããããã®ãã¼ã¿ãã¼ã¹ããµãã¼ãããããã«ä½¿ ç¨ãããã¢ã¸ã¥ã¼ã«ã¸ã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ãæãã¾ããdbxã¢ã¸ã¥ã¼ã«ã§ ãã¼ã¿ãã¼ã¹ã使ç¨å¯è½ã¨ããã«ã¯ããã®ã¢ã¸ã¥ã¼ã«ã PHPã«ãªã³ã¯ãã ãããã¼ããããå¿ è¦ãããããã®ãã¼ã¿ãã¼ã¹ã®ã¢ã¸ã¥ã¼ã«ã¯ãdbx㢠ã¸ã¥ã¼ã«ã«ãµãã¼ãããã¦ããå¿ è¦ãããã¾ããç¾å¨ãMySQLã PostgreSQLãODBCããµãã¼ãããã¦ããããã®ä»ã«ã¤ãã¦ã(叿ç観測 ã ã¨ã¾ããªã)追å ãããäºå®ã§ãã </simpara> <simpara> dbx ã«ãã¼ã¿ãã¼ã¹ã®ãµãã¼ãã追å ããããã®ããã¥ã¡ã³ãã¯ã <ulink url="&url.dbx.docs;">&url.dbx.docs;</ulink> ã«ããã¾ãã </simpara> </partintro> <refentry id="function.dbx-close"> <refnamediv> <refname>dbx_close</refname> <refpurpose>ãªã¼ãã³ãããæ¥ç¶/ãã¼ã¿ãã¼ã¹ãéãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>dbx_close</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«<literal>TRUE</literal>ãã¨ã©ã¼ã®éã« <literal>FALSE</literal>ãè¿ãã¾ãã </para> <example> <title><function>dbx_close</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password") or die ("Could not connect"); print("Connected successfully"); dbx_close($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> <para> <function>dbx_connect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-connect"> <refnamediv> <refname>dbx_connect</refname> <refpurpose>æ¥ç¶/ãã¼ã¿ãã¼ã¹ããªã¼ãã³ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>dbx_link_object <function>dbx_connect</function></funcdef> <paramdef>string <parameter>module</parameter></paramdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>string <parameter>database</parameter></paramdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> <paramdef>int <parameter><optional>persistent</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> è¿ãå¤: æåæã«dbx_link_objectãã¨ã©ã¼æã« <literal>FALSE</literal>ãæ¥ç¶ã確ç«ããããããã¼ã¿ãã¼ã¹ã鏿 ã§ããªãå ´åã§ãããã®é¢æ°ã¯ dbx_link_object ãè¿ãã¾ãããã©ã¡ã¼ ã¿<parameter>persistent</parameter>ã«DBX_PERSISTENTãè¨å®ããã㨠ãã§ãããã®å ´åã«ã¯ãæç¶çæ¥ç¶ã使ããã¾ãã </para> <para> 使ç¨å¯è½ãªã¢ã¸ã¥ã¼ã«åã以ä¸ã«ç¤ºãã¾ãããã ããã¢ã¸ã¥ã¼ã«ãå®é ã«ãã¼ãããã¦ããå ´åã«ã®ã¿åä½ãããã¨ã«æ³¨æãã¦ä¸ããã </para> <para> <itemizedlist> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 1: "mysql" </simpara> </listitem> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 2: "odbc" </simpara> </listitem> <listitem> <simpara> ã¢ã¸ã¥ã¼ã« 3: "pgsql" </simpara> </listitem> </itemizedlist> </para> <para> pgsql ãµãã¼ãã¯ãã¾ã å®é¨çã§ãããã½ã¼ã¹ãã¡ã¤ã«ã®ä¸ã¤ãèªåã§ ä¿®æ£ããå¾ã§ pgsql ã¢ã¸ã¥ã¼ã«ãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ããä¿®æ£ ãè¡ããªãã¨ã¯ã¨ãªæ¯ã« PostgreSQLã®è¦åãçºçãã¦ãã¾ãã¾ãã </para> <para> dbx_link_object ã¯ã3ã¤ã®ã¡ã³ã 'handle'ã'module'ã'database' ã æãã¾ããã¡ã³ã 'database'ã¯ãç¾å¨é¸æããã¦ãããã¼ã¿ãã¼ã¹ã®å åã§ããã¡ã³ã'module'ã¯ãdbxã®å é¨ã®ã¿ã§ä½¿ç¨ãããä¸è¨ã®æå¹ãªã¢ ã¸ã¥ã¼ã«çªå·ã§ããã¡ã³ã 'handle' ã¯ããã¼ã¿ãã¼ã¹æ¥ç¶ã«é¢ããæ å¹ãªãã³ãã«ã§ã(å¿ è¦ã«å¿ãã¦)ã¢ã¸ã¥ã¼ã«å°ç¨é¢æ°ã§ä½¿ç¨ããã¾ãã ä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password"); mysql_close ($link->handle); // dbx_close($link) ã®æ¹ãè¯ãããããã¾ãã ?> </programlisting> </informalexample> </para> <para> ãã©ã¡ã¼ã¿hostãdatabaseãusernameãpasswordãå¿ è¦ã§ãããå¸¸ã«æ½ 象åã¢ã¸ã¥ã¼ã«ã§ä½¿ç¨ãããããã§ã¯ããã¾ããã </para> <para> <example> <title><function>dbx_connect</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("odbc", "", "db", "username", "password", DBX_PERSISTENT) or die ("æ¥ç¶ã§ãã¾ãã"); print ("æ¥ç¶ã«æåãã¾ãã"); dbx_close ($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> </para> <para> <function>dbx_close</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-error"> <refnamediv> <refname>dbx_error</refname> <refpurpose> (æ¥ç¶æã ãã§ãªã)使ç¨ããã¢ã¸ã¥ã¼ã«ã®ææ°ã®é¢æ°ã³ã¼ã«ã«ããã㨠ã©ã¼ã¡ãã»ã¼ã¸ãåºåãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>string <function>dbx_error</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> ã¢ã¸ã¥ã¼ã«(ä¾ãã° mysql-module)ã®ç´è¿ã®é¢æ°ã³ã¼ã«ããã¨ã©ã¼ã¡ãã»ã¼ ã¸ãæããæååãè¿ãã¾ããåãã¢ã¸ã¥ã¼ã«ã«è¤æ°ã®æ¥ç¶ãããå ´åã æå¾ã®ã¨ã©ã¼ã®ã¿ãåå¾ããã¾ããå¥ã®ã¢ã¸ã¥ã¼ã«ã«æ¥ç¶ãããå ´åã (ãªã³ã¯ãã©ã¡ã¼ã¿ã§)æå®ããã¢ã¸ã¥ã¼ã«ã«é¢ããç´è¿ã®ã¨ã©ã¼ã®ã¿ã è¿ããã¾ããODBCã¢ã¸ã¥ã¼ã«ã¯ç¾å¨ã¨ã©ã¼åºå颿°ããµãã¼ããã¦ã㪠ããã¨ã«æ³¨æãã¦ä¸ããã </para> <example> <title><function>dbx_error</function>ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("mysql", "localhost", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "select id from nonexistingtbl"); if ($result==0) { echo dbx_error ($link); } dbx_close ($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> </refsect1> </refentry> <refentry id="function.dbx-query"> <refnamediv> <refname>dbx_query</refname> <refpurpose>ã¯ã¨ãªãéä¿¡ãã(ããå ´åã«ã¯)çµæãå ¨ã¦åå¾ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>dbx_result_object <function>dbx_query</function></funcdef> <paramdef>dbx_link_object <parameter>link_identifier</parameter> </paramdef> <paramdef>string <parameter>sql_statement</parameter></paramdef> <paramdef>long <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«dbx_result_objectã¾ãã¯1ãè¿ãã¾ããçµæãªãã¸ã§ã¯ãã¯ã SQLå½ä»¤ãçµæãè¿ãå ´åã«ã®ã¿è¿ããã¾ããã¨ã©ã¼ã®å ´åã«ã¯ã0ãè¿ ãã¾ãããã©ã¡ã¼ã¿ <parameter>flags</parameter> ã¯ãè¿ãããæ å ± ã®éãå¶å¾¡ããããã«ä½¿ç¨ããã¾ãã宿° DBX_RESULT_INFO, DBX_RESULT_INDEX, DBX_RESULT_ASSOC ã¾ãã¯ãããã®è«çåãçµã¿åã ãããã¨ãå¯è½ã§ããDBX_RESULT_INFO ãæå®ããã¨ãã£ã¼ã«ãåãã ã³ãã£ã¼ã«ãåã®ãããªã«ã©ã ã«é¢ããæ å ±ãæä¾ããã¾ãã DBX_RESULT_INDEX ã«ãããçµæã¯(data[2][3]ã®ãããªããã ãã2ã¯ã¬ ã³ã¼ãçªå·ã3ã¯ã«ã©ã çªå·)2次å ã®é åã§è¿ããã¾ãããã ããæåã® ã¬ã³ã¼ãããã³ã«ã©ã çªå·ã¯0ããå§ã¾ãã¾ãã DBX_RESULT_ASSOC ã«ããããã£ã¼ã«ãåã«ã«ã©ã æ·»åãé¢é£ä»ãããã¾ ãããã©ã¡ã¼ã¿<parameter>flags</parameter> ã«ããã DBX_RESULT_INDEXã¯å¸¸ã«è¿ããããã¨ã«æ³¨æãã¦ä¸ããã DBX_RESULT_ASSOC ãæå®ãããå ´åãDBX_RESULT_INFOã¯æå®ãããªã å ´åã§ãè¿ããã¾ããããã¯ãDBX_RESULT_INDEX,DBX_RESULT_INDEX | DBX_RESULT_INFO ããã³ DBX_RESULT_INDEX | DBX_RESULT_INFO | DBX_RESULT_ASSOC ã®çµã¿åããã®ã¿ãçµæçã«ä½¿ç¨å¯è½ã§ãããã¨ãæ å³ãã¾ãã <parameter>flags</parameter> ãæå®ãããªãå ´åããã® æå¾ã®çµã¿åãããããã©ã«ãã§ãã飿³é åã§åç §ãããçµæã¯ãæ·» åçªå·ã®çµæã¸ã®ãªãã¡ã¬ã³ã¹ã§ãããã®ããã <literal>data[0][0]</literal> ãä¿®æ£ããå ´åã <literal>data[0]['fieldnameforfirstcolumn']</literal> ãåæã«ä¿® æ£ããã¾ãã </para> <para> dbx_result_object ã«ã¯ã5ã¤ã®ã¡ã³ããããã¾ãã (<parameter>flags</parameter>ã«ãã£ã¦ã¯4ã¤ã®å ´åãããã¾ã)ããã ã¯ã'handle', 'cols', 'rows', 'info'(ãªãã·ã§ã³), 'data'ã§ãã handle ã¯ãæå®ããã¢ã¸ã¥ã¼ã«ã«é¢ããæå¹ãªçµæIDã§ãããæ¬¡ã®ãã ã«ã¢ã¸ã¥ã¼ã«å°ç¨é¢æ°ã§ä½¿ç¨å¯è½ã§ãã </para> <para> <informalexample role="php"> <programlisting> $result = dbx_query ($link, "SELECT id FROM tbl"); mysql_field_len ($result->handle, 0); </programlisting> </informalexample> </para> <para> ã¡ã³ã cols ããã³ rows ã¯ãããããã«ã©ã (ã¾ãã¯ãã£ã¼ã«ã)çªå· ããã³è¡(ã¾ãã¯ã¬ã³ã¼ã)çªå·ã§ããä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> $result = dbx_query ($link, "SELECT id FROM tbl"); echo "çµæã®ãµã¤ãº: " . $result->rows . " x " . $result->cols . "<br>\n"; </programlisting> </informalexample> </para> <para> ã¡ã³ãinfoã¯ãDBX_RESULT_INFOã¾ãã¯DBX_RESULT_ASSOCã <parameter>flags</parameter>ãã©ã¡ã¼ã¿ã§æå®ãããå ´åã®ã¿è¿ãã ã¾ãããã®ã¡ã³ãã¯2次å é åã§ãã«ã©ã æ å ±ãåå¾ããããã«äºã¤ã®ã¬ ã³ã¼ã("name"ã¨"type")ãæãã¦ãã¾ããä¾ãã°ã </para> <para> <informalexample> <programlisting role="php"> $result = dbx_query ($link, "SELECT id FROM tbl"); echo "ã«ã©ã å: " . $result->info["name"][0] . "<br>\n"; echo "ã«ã©ã å: " . $result->info["type"][0] . "<br>\n"; </programlisting> </informalexample> </para> <para> ã¡ã³ãdataã«ã¯ãå®éã®çµæãå«ã¾ãã¾ããããã¦ãã«ã©ã åãåæ§ã« é¢é£ãã¦ãã¾ããDBX_RESULT_ASSOCãè¨å®ãããå ´åã <literal>$result->data[2]["fieldname"]</literal>ã使ç¨ãããã¨ã å¯è½ã§ãã </para> <example> <title><function>dbx_query</function> ã®ä¾</title> <programlisting role="php"> <?php $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl"); if ($result==0) echo "ã¯ã¨ãªã«å¤±æãã¾ãã\n<br>"; elseif ($result==1) { echo "ã¯ã¨ãªã®å®è¡ã«æåãã¾ãã\n<br>"; } else { $rows=$result->rows; $cols=$result->cols; echo "<p>ãã¼ãã«æ¬¡å : {$result->rows} x {$result->cols}<br><table border=1>\n"; echo "<tr>"; for ($col=0; $col<$cols; ++$col) { echo "<td>-{$result->info["name"][$col]}-<br>-{$result->info["type"][$col]}-</td>"; } echo "</tr>\n"; for ($row=0; $row<$rows; ++$row){ echo "<tr>"; for ($col=0; $col<$cols; ++$col) { echo "<td>-{$result->data[$row][$col]}-</td>"; } echo "</tr>\n"; } echo "</table><p>\n"; echo "ãã¼ãã«æ¬¡å : {$result->rows} x id, parentid, description<br><table border=1>\n"; for ($row=0; $row<$rows; ++$row) { echo "<tr>"; echo "<td>-{$result->data[$row]["id"]}-</td>"; echo "<td>-{$result->data[$row]["parentid"]}-</td>"; echo "<td>-{$result->data[$row]["description"]}-</td>"; echo "</tr>\n"; } echo "</table><p>\n"; } dbx_close($link); ?> </programlisting> </example> <note> <para> ã¢ã¸ã¥ã¼ã«æ¯ã®ããã¥ã¡ã³ããåç §ä¸ããã </para> </note> <para> <function>dbx_connect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-sort"> <refnamediv> <refname>dbx_sort</refname> <refpurpose> ã«ã¹ã¿ãã¤ãºãããsort颿°ã«ãããdbx_queryããçµæãã½ã¼ããã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>dbx_sort</function></funcdef> <paramdef>dbx_result_object <parameter>result</parameter></paramdef> <paramdef>string <parameter>user_compare_function</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æåæã«<literal>TRUE</literal>ãã¨ã©ã¼æã« <literal>FALSE</literal>ãè¿ãã¾ãã </para> <example> <title><function>dbx_sort</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) $rv = dbx_cmp_asc ($a, $b, "id"); return $rv; } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯ãidã§ã½ã¼ãããã¦ãã¾ã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidã§ã½ã¼ããããç¶ãã¦ãidã§ã½ã¼ãããã¾ã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_cmp_asc</function> ããã³ <function>dbx_cmp_desc</function> ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-cmp-asc"> <refnamediv> <refname>dbx_cmp_asc</refname> <refpurpose> æé ã«ã½ã¼ãããããã«äºã¤ã®ã¬ã³ã¼ããæ¯è¼ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>int <function>dbx_cmp_asc</function></funcdef> <paramdef>array <parameter>row_a</parameter></paramdef> <paramdef>array <parameter>row_b</parameter></paramdef> <paramdef>string <parameter>columnname_or_index</parameter></paramdef> </funcprototype> </funcsynopsis> <para> row_a[$columnname_or_index] ã row_b[$columnname_or_index] ã«çã ãå ´åã« 0ããã大ããå ´åã« 1ãããå°ããå ´åã« -1 ãè¿ãã¾ãã </para> <example> <title><function>dbx_cmp_asc</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) { $rv = dbx_cmp_asc ($a, $b, "id"); return $rv; } } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯idã§ã½ã¼ãããã¾ãã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidããã¦idã§ã½ã¼ãããã¾ãã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_sort</function>ããã³ <function>dbx_cmp_desc</function>ãåç §ä¸ããã </para> </refsect1> </refentry> <refentry id="function.dbx-cmp-desc"> <refnamediv> <refname>dbx_cmp_desc</refname> <refpurpose> éé ã«ã½ã¼ãããããã«äºã¤ã®ã¬ã³ã¼ããæ¯è¼ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>int <function>dbx_cmp_desc</function></funcdef> <paramdef>array <parameter>row_a</parameter></paramdef> <paramdef>array <parameter>row_b</parameter></paramdef> <paramdef>string <parameter>columnname_or_index</parameter> </paramdef> </funcprototype> </funcsynopsis> <para> row_a[$columnname_or_index] ã row_b[$columnname_or_index] ã«çã ãå ´åã« 0ããã大ããå ´åã«-1ãããå°ããå ´åã«1ãè¿ãã¾ãã </para> <example> <title><function>dbx_cmp_desc</function>ã®ä¾</title> <programlisting role="php"> <?php function user_re_order ($a, $b) { $rv = dbx_cmp_asc ($a, $b, "parentid"); if (!$rv) { $rv = dbx_cmp_asc($a, $b, "id"); return $rv; } } $link = dbx_connect ("odbc", "", "db", "username", "password") or die ("æ¥ç¶ã§ãã¾ãã"); $result = dbx_query ($link, "SELECT id, parentid, description FROM tbl ORDER BY id"); echo "çµæã¯idã§ã½ã¼ãããã¾ãã<br>"; dbx_query ($result, "user_re_order"); echo "çµæã¯parentidããã¦idã§ã½ã¼ãããã¾ãã<br>"; dbx_close ($link); ?> </programlisting> </example> <para> <function>dbx_sort</function>ããã³ <function>dbx_cmp_asc</function>ãåç §ä¸ããã </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->