cvs: phpdoc-es /reference/image/functions imagepolygon.xml

From: 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&iacute;gono</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;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&iacute;gono en la imagen id. points es un - array PHP conteniendo los v&eacute;rtices del pol&iacute;gono. de la siguiente - forma points[0] = x0, points1 = y0, points[2] = x1, points[3] = - y1, etc. num_points es el n&uacute;mero total de v&eacute;rtices.</para> + <function>imagepolygon</function> crea un pol&iacute;gono en la imagen <parameter>im</parameter>. + <parameter>points</parameter> es una matriz que contiene los v&eacute;rtices del pol&iacute;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&uacute;mero total de v&eacute;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&eacute;n <function>imagecreate</function>.</para> + Vea tambi&eacute;n <function>imagecreate</function> y + <function>imagecreatetruecolor</function>. + </para> </refsect1> </refentry>

« previous php.doc.es (#1243) next »