cvs: phpdoc-es /reference/image/functions imagefilledpolygon.xml
| From: | Javier Eguiluz | Date: | Sun, 07 Aug 2005 12:07:19 +0000 |
| Subject: | cvs: phpdoc-es /reference/image/functions imagefilledpolygon.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-1236@lists.php.net to get a copy of this message | ||
javi Sun Aug 7 08:07:19 2005 EDT
Modified files:
/phpdoc-es/reference/image/functions imagefilledpolygon.xml
Log:
- Añadido EN-Revision
- Actualizada la descripcion
- Añadido un ejemplo
http://cvs.php.net/diff.php/phpdoc-es/reference/image/functions/imagefilledpolygon.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc-es/reference/image/functions/imagefilledpolygon.xml
diff -u phpdoc-es/reference/image/functions/imagefilledpolygon.xml:1.1
phpdoc-es/reference/image/functions/imagefilledpolygon.xml:1.2
--- phpdoc-es/reference/image/functions/imagefilledpolygon.xml:1.1 Sun Apr 14 20:14:51 2002
+++ phpdoc-es/reference/image/functions/imagefilledpolygon.xml Sun Aug 7 08:07:19 2005
@@ -1,26 +1,70 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- splitted from ./es/functions/image.xml, last change in rev 1.1 -->
-<!-- last change to 'imagefilledpolygon' in en/ tree in rev 1.2 -->
+<!-- $Revision: 1.2 $ -->
+<!-- EN-Revision: 1.8 Maintainer: javi Status: ready -->
+<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imagefilledpolygon">
<refnamediv>
- <refname>ImageFilledPolygon</refname>
+ <refname>imagefilledpolygon</refname>
<refpurpose>Dibuja un polígono relleno</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
- <type>int</type><methodname>imagefilledpolygon</methodname>
-
<methodparam><type>int</type><parameter>im</parameter></methodparam>
+ <type>bool</type><methodname>imagefilledpolygon</methodname>
+
<methodparam><type>resource</type><parameter>im</parameter></methodparam>
<methodparam><type>array</type><parameter>points</parameter></methodparam>
<methodparam><type>int</type><parameter>num_points</parameter></methodparam>
<methodparam><type>int</type><parameter>col</parameter></methodparam>
</methodsynopsis>
<para>
- ImageFilledPolygon crea un polígono relleno en la imagen im,
- points es una matriz PHP conteniendo los vértices del
- poligono, por ejemplo. points[0] = x0, points[1] = y0,
- points[2] = x1, points[3] = y1, etc.
- num_points es el número total de vértices.</para>
+ <function>imagefilledpolygon</function> crea un polígono relleno en la
+ imagen <parameter>im</parameter>.
+ </para>
+ <para>
+ <parameter>points</parameter> es una matriz conteniendo los vértices
+ <literal>x</literal> e <literal>y</literal> del polígono, por
ejemplo:
+ points[0] = x0, points[1] = y0, points[2] = x1, points[3] = y1, etc.
+ </para>
+ <para>
+ <parameter>num_points</parameter> es el número total de
vértices,
+ que debe ser mayor que 3.
+ </para>
+ <para>
+ <example>
+ <title>Ejemplo de <function>imagefilledpolygon</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Crear la matriz de los verices del poligono
+$values = array(
+ 40, 50, // Point 1 (x, y)
+ 20, 240, // Point 2 (x, y)
+ 60, 60, // Point 3 (x, y)
+ 240, 20, // Point 4 (x, y)
+ 50, 40, // Point 5 (x, y)
+ 10, 10 // Point 6 (x, y)
+ );
+
+// crear la imagen
+$image = imagecreate(250, 250);
+
+// preparar los colores
+$bg = imagecolorallocate($image, 200, 200, 200);
+$blue = imagecolorallocate($image, 0, 0, 255);
+
+// dibujar el poligono
+imagefilledpolygon($image, $values, 6, $blue);
+
+// mostrar la imagen
+header('Content-type: image/png');
+imagepng($image);
+imagedestroy($image);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+
</refsect1>
</refentry>