1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-26 08:22:08 +01:00
Files
archived-doc-es/reference/image/functions/imagefilledpolygon.xml
Richard Quadling 1fa367dd0d Native EOL
Use consistent line terminator.


git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@317671 c90b9560-bf6c-de11-be94-00142212c4b1
2011-10-03 16:59:17 +00:00

133 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
<refentry xml:id="function.imagefilledpolygon" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagefilledpolygon</refname>
<refpurpose>Dibujar un polígono con relleno</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>imagefilledpolygon</methodname>
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
<methodparam><type>array</type><parameter>points</parameter></methodparam>
<methodparam><type>int</type><parameter>num_points</parameter></methodparam>
<methodparam><type>int</type><parameter>color</parameter></methodparam>
</methodsynopsis>
<para>
<function>imagefilledpolygon</function> crea un polígono relleno
en <parameter>image</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&gd.image.description;
<varlistentry>
<term><parameter>points</parameter></term>
<listitem>
<para>
Una matriz que contiene las coordenadas <literal>x</literal> e
<literal>y</literal> de los vértices del polígono consecutivamente.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>num_points</parameter></term>
<listitem>
<para>
Número total de vértices, lo que debe ser al menos 3.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>color</parameter></term>
<listitem>
<para>
Un identificador de color creado con
<function>imagecolorallocate</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Ejemplo de <function>imagefilledpolygon</function></title>
<programlisting role="php">
<![CDATA[
<?php
// establecer una matriz de puntos para el polígono
$valores = 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 imagen
$imagen = imagecreatetruecolor(250, 250);
// asignar colores
$fondo = imagecolorallocate($imagen, 0, 0, 0);
$azul = imagecolorallocate($imagen, 0, 0, 255);
// rellenar el fondo
imagefilledrectangle($imagen, 0, 0, 249, 249, $fondo);
// dibujar un polígono
imagefilledpolygon($imagen, $valores, 6, $azul);
// volcar imagen
header('Content-type: image/png');
imagepng($imagen);
imagedestroy($imagen);
?>
]]>
</programlisting>
&example.outputs.similar;
<mediaobject>
<alt>Salida del ejemplo : imagefilledpolygon()</alt>
<imageobject>
<imagedata fileref="en/reference/image/figures/imagefilledpolygon.png"/>
</imageobject>
</mediaobject>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->