svn: /phpdoc/en/trunk/reference/imagick/ figures/floodfillpaint_intermediate.png figures/floodfillpaint_result.png imagick/floodfillpaintimage.xml
| From: | Mikko Koppanen | Date: | Sat, 03 Oct 2009 12:32:14 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/imagick/ figures/floodfillpaint_intermediate.png figures/floodfillpaint_result.png imagick/floodfillpaintimage.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5049@lists.php.net to get a copy of this message | ||
mkoppanen Sat, 03 Oct 2009 12:32:14 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289126
Log:
Added floodfillpaint example and images generated
Changed paths:
A phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_intermediate.png
A phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_result.png
U phpdoc/en/trunk/reference/imagick/imagick/floodfillpaintimage.xml
Added: phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_intermediate.png
===================================================================
(Binary files differ)
Property changes on: phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_intermediate.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_result.png
===================================================================
(Binary files differ)
Property changes on: phpdoc/en/trunk/reference/imagick/figures/floodfillpaint_result.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: phpdoc/en/trunk/reference/imagick/imagick/floodfillpaintimage.xml
===================================================================
--- phpdoc/en/trunk/reference/imagick/imagick/floodfillpaintimage.xml 2009-10-03 11:41:13 UTC (rev
289125)
+++ phpdoc/en/trunk/reference/imagick/imagick/floodfillpaintimage.xml 2009-10-03 12:32:14 UTC (rev
289126)
@@ -12,7 +12,7 @@
<type>bool</type><methodname>Imagick::floodFillPaintImage</methodname>
<methodparam><type>mixed</type><parameter>fill</parameter></methodparam>
<methodparam><type>float</type><parameter>fuzz</parameter></methodparam>
-
<methodparam><type>mixed</type><parameter>bordercolor</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>target</parameter></methodparam>
<methodparam><type>int</type><parameter>x</parameter></methodparam>
<methodparam><type>int</type><parameter>y</parameter></methodparam>
<methodparam><type>bool</type><parameter>invert</parameter></methodparam>
@@ -48,10 +48,10 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>bordercolor</parameter></term>
+ <term><parameter>target</parameter></term>
<listitem>
<para>
- ImagickPixel object or a string containing the border color. This is the target color to
paint.
+ ImagickPixel object or a string containing the target color to paint
</para>
</listitem>
</varlistentry>
@@ -98,6 +98,59 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><methodname>Imagick::floodfillPaintImage</methodname>
example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+/* Create new imagick object */
+$im = new Imagick();
+
+/* create red, green and blue images */
+$im->newImage(100, 50, "red");
+$im->newImage(100, 50, "green");
+$im->newImage(100, 50, "blue");
+
+/* Append the images into one */
+$im->resetIterator();
+$combined = $im->appendImages(true);
+
+/* Save the intermediate image for comparison */
+$combined->writeImage("floodfillpaint_intermediate.png");
+
+/* The target pixel to paint */
+$x = 1;
+$y = 1;
+
+/* Get the color we are painting */
+$target = $combined->getImagePixelColor($x, $y);
+
+/* Paints pixel in position 1,1 black and all neighboring
+ pixels that match the target color */
+$combined->floodfillPaintImage("black", 1, $target, $x, $y, false);
+
+/* Save the result */
+$combined->writeImage("floodfillpaint_result.png");
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="en/reference/imagick/figures/floodfillpaint_intermediate.png"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="en/reference/imagick/figures/floodfillpaint_result.png"/>
+ </imageobject>
+ </mediaobject>
+ </example>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file