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

From: Date: Sat, 06 Aug 2005 12:14:50 +0000
Subject: cvs: phpdoc-es /reference/image/functions imagecolorallocate.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-1221@lists.php.net to get a copy of this message
javi Sat Aug 6 08:14:50 2005 EDT Modified files: /phpdoc-es/reference/image/functions imagecolorallocate.xml Log: - Añadido EN-Revision - Actualizada la descripcion - Añadido el ejemplo - Actualizado el See Also http://cvs.php.net/diff.php/phpdoc-es/reference/image/functions/imagecolorallocate.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/image/functions/imagecolorallocate.xml diff -u phpdoc-es/reference/image/functions/imagecolorallocate.xml:1.1 phpdoc-es/reference/image/functions/imagecolorallocate.xml:1.2 --- phpdoc-es/reference/image/functions/imagecolorallocate.xml:1.1 Sun Apr 14 20:14:51 2002 +++ phpdoc-es/reference/image/functions/imagecolorallocate.xml Sat Aug 6 08:14:45 2005 @@ -1,30 +1,68 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/image.xml, last change in rev 1.1 --> -<!-- last change to 'imagecolorallocate' in en/ tree in rev 1.36 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: javi Status: ready --> +<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 --> <refentry id="function.imagecolorallocate"> <refnamediv> - <refname>ImageColorAllocate</refname> + <refname>imagecolorallocate</refname> <refpurpose>Reserva un color para una imagen</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>int</type><methodname>imagecolorallocate</methodname> - <methodparam><type>int</type><parameter>im</parameter></methodparam> + <methodparam><type>resource</type><parameter>im</parameter></methodparam> <methodparam><type>int</type><parameter>red</parameter></methodparam> <methodparam><type>int</type><parameter>green</parameter></methodparam> <methodparam><type>int</type><parameter>blue</parameter></methodparam> </methodsynopsis> <para> - ImageColorAllocate devuelve un identificador del color - representado por la mezcla de los componentes RGB dados. El - par&aacute;metro im es el resultado de la funci&oacute;n <function>imagecreate</function>. - ImageColorAlocate tiene que ser invocada para crear cada color - que va a ser usado por la imagen que representa im. - <informalexample><programlisting> -$white = ImageColorAllocate($im, 255,255,255); -$black = ImageColorAllocate($im, 0,0,0); -</programlisting></informalexample></para> + <function>imagecolorallocate</function> devuelve un identificador del color + representado por la mezcla de los componentes <acronym>RGB</acronym> dados. + El par&aacute;metro <parameter>im</parameter> es el resultado de la funci&oacute;n + <function>imagecreate</function>. <parameter>red</parameter>, <parameter>green</parameter> and + <parameter>blue</parameter> son lo valores de los componentes rojo, verde y azul + del color seleccionado. Los valores se indican como n&uacute;meros enteros + entre 0 y 255 o como n&uacute;meros hexadecimales entre 0x00 y 0xFF. La funci&oacute;n + <function>imagecolorallocate</function> se debe llamar para crear cada uno de los + colores que se van a emplear en la imagen. + </para> + <note> + <para> + La primera llamada a <function>imagecolorallocate</function> se emplea para + seleccionar el color de fondo. + </para> + </note> + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +// establece el color de fondo a rojo +$background = imagecolorallocate($im, 255, 0, 0); + +// crea algunos colores +$white = imagecolorallocate($im, 255, 255, 255); +$black = imagecolorallocate($im, 0, 0, 0); + +// empleando valores hexadecimales +$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF); +$black = imagecolorallocate($im, 0x00, 0x00, 0x00); + +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + Devuelve -1 si la funci&oacute;n no tiene &eacute;xito. + </para> + <para> + Vea tambi&eacute;n <function>imagecolorallocatealpha</function> y + <function>imagecolordeallocate</function>. + </para> + </refsect1> </refentry>

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