svn: /phpdoc/ja/trunk/reference/imagick/imagickpixel/ getcolor.xml
[email protected] (Yoshinari Takaoka)
| Newsgroups | php.doc.ja |
|---|---|
| Message-ID | <[email protected]> |
mumumu Sat, 05 Dec 2020 11:28:11 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=351894
Log:
ImagickPixel::getColor() takes an int, not a bool
Closes GH-262.
Changed paths:
U phpdoc/ja/trunk/reference/imagick/imagickpixel/getcolor.xml
Modified: phpdoc/ja/trunk/reference/imagick/imagickpixel/getcolor.xml
===================================================================
--- phpdoc/ja/trunk/reference/imagick/imagickpixel/getcolor.xml 2020-12-05 11:20:13 UTC (rev 351893)
+++ phpdoc/ja/trunk/reference/imagick/imagickpixel/getcolor.xml 2020-12-05 11:28:11 UTC (rev 351894)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 351855 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 351875 Maintainer: takagi Status: ready -->
+<!-- Credits: mumumu -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagickpixel.getcolor">
<refnamediv>
<refname>ImagickPixel::getColor</refname>
@@ -28,7 +29,54 @@
<listitem>
<para>
色を正規化する。
+ 有効な値は
+ <literal>0</literal>,
+ <literal>1</literal>, <literal>2</literal> です。
</para>
+ <table>
+ <title>
+ <parameter>normalized</parameter> で有効な値の一覧
+ </title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry><parameter>normalized</parameter></entry>
+ <entry>説明</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <constant>0</constant>
+ </entry>
+ <entry>
+ RGB の値を <literal>0</literal> から <literal>255</literal> の間の値を取る
+ <type>int</type> として返します (0 と 255 を含みます)。
+ アルファの値を <literal>0</literal> または <literal>1</literal> の
+ <type>int</type> として返します。
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <constant>1</constant>
+ </entry>
+ <entry>
+ RGBA の値を <literal>0</literal> から <literal>1</literal> の間の値を取る
+ <type>float</type> として返します (0 と 1 を含みます)。
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <constant>2</constant>
+ </entry>
+ <entry>
+ RGBA の値を <literal>0</literal> から <literal>255</literal> の間の値を取る
+ <type>int</type> として返します (0 と 255 を含みます)。
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</listitem>
</varlistentry>
</variablelist>
@@ -38,9 +86,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- 各チャネルの値を配列で返します。パラメータに &true;
- を指定した場合は、各値を正規化します。エラー時には
- ImagickPixelException をスローします。
+ 各チャネルの値を配列で返します。
+ エラー時には ImagickPixelException をスローします。
</para>
</refsect1>
@@ -64,7 +111,7 @@
echo "Standard values".PHP_EOL;
print_r($colorInfo);
-$colorInfo = $color->getColor(true);
+$colorInfo = $color->getColor(1);
echo "Normalized values:".PHP_EOL;
print_r($colorInfo);