cvs: phpdoc-es /reference/image/functions imagepolygon.xml
| From: | Javier Eguiluz | Date: | Sun, 07 Aug 2005 12:25:40 +0000 |
| Subject: | cvs: phpdoc-es /reference/image/functions imagepolygon.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-1243@lists.php.net to get a copy of this message | ||
javi Sun Aug 7 08:25:40 2005 EDT
Modified files:
/phpdoc-es/reference/image/functions imagepolygon.xml
Log:
- Añadido EN-Revision
- Actualizada la descripcion
- Añadido un ejemplo
http://cvs.php.net/diff.php/phpdoc-es/reference/image/functions/imagepolygon.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc-es/reference/image/functions/imagepolygon.xml
diff -u phpdoc-es/reference/image/functions/imagepolygon.xml:1.1
phpdoc-es/reference/image/functions/imagepolygon.xml:1.2
--- phpdoc-es/reference/image/functions/imagepolygon.xml:1.1 Sun Apr 14 20:14:52 2002
+++ phpdoc-es/reference/image/functions/imagepolygon.xml Sun Aug 7 08:25:40 2005
@@ -1,27 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- splitted from ./es/functions/image.xml, last change in rev 1.1 -->
-<!-- last change to 'imagepolygon' in en/ tree in rev 1.2 -->
+<!-- $Revision: 1.2 $ -->
+<!-- EN-Revision: 1.9 Maintainer: javi Status: ready -->
+<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imagepolygon">
<refnamediv>
- <refname>ImagePolygon</refname>
+ <refname>imagepolygon</refname>
<refpurpose>Dibuja un polígono</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
- <type>int</type><methodname>imagepolygon</methodname>
-
<methodparam><type>int</type><parameter>im</parameter></methodparam>
+ <type>bool</type><methodname>imagepolygon</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>
- ImagePolygon crea un polígono en la imagen id. points es un
- array PHP conteniendo los vértices del polígono. de la siguiente
- forma points[0] = x0, points1 = y0, points[2] = x1, points[3] =
- y1, etc. num_points es el número total de vértices.</para>
+ <function>imagepolygon</function> crea un polígono en la imagen
<parameter>im</parameter>.
+ <parameter>points</parameter> es una matriz que contiene los vértices del
polígono,
+ de la siguiente forma: points[0] = x0, points[1] = y0, points[2] = x1, points[3] =
+ y1, etc. <parameter>num_points</parameter> es el número total de
vértices.
+ </para>
+ <para>
+ <example>
+ <title>Ejemplo de <function>imagepolygon</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// crear una imagen vacia
+$image = imagecreate(400, 300);
+
+// rellenarla con el color de fondo
+$bg = imagecolorallocate($image, 0, 0, 0);
+
+// crear el color para el poligono
+$col_poly = imagecolorallocate($image, 255, 255, 255);
+
+// dibujar el poligono
+imagepolygon($image,
+ array (
+ 0, 0,
+ 100, 200,
+ 300, 200
+ ),
+ 3,
+ $col_poly);
+
+// mostrar la imagen
+header("Content-type: image/png");
+imagepng($image);
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
<para>
- Vea también <function>imagecreate</function>.</para>
+ Vea también <function>imagecreate</function> y
+ <function>imagecreatetruecolor</function>.
+ </para>
</refsect1>
</refentry>