mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@305975 c90b9560-bf6c-de11-be94-00142212c4b1
199 lines
6.4 KiB
XML
199 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: c621e33dd31b5a1914c176b681550cb45335496d Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.imagefilledarc" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagefilledarc</refname>
|
|
<refpurpose>Dibujar un arco parcial y rellenarlo</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagefilledarc</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>cx</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>cy</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>width</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>height</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>start</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>end</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>color</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>style</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Dibuja un arco parcial con centro en las coordenadas especificadas en <parameter>image</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>cx</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Coordenada x del centro.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>cy</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Coordenada y del centro
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>width</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El ancho del arco.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>height</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El alto del arco.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>start</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El ángulo de inicio del arco, en grados.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>end</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El ángulo de finalización del arco, en grados.
|
|
0º esta localizado en la posición que marca la aguja horaria a las tres en punto, y
|
|
el arco se dibuja en el sentido de las agujas del reloj.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>color</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un identificador de color creado con
|
|
<function>imagecolorallocate</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>style</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un OR a nivel de bit de las siguientes posibilidades:
|
|
<orderedlist>
|
|
<listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem>
|
|
<listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem>
|
|
<listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem>
|
|
<listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem>
|
|
</orderedlist>
|
|
<constant>IMG_ARC_PIE</constant> y <constant>IMG_ARC_CHORD</constant> son
|
|
mútuamente exclusivos; <constant>IMG_ARC_CHORD</constant>
|
|
conecta los ángulos de inicio y de finalización con una línea recta, mientras que
|
|
<constant>IMG_ARC_PIE</constant> produce un borde redondeado.
|
|
<constant>IMG_ARC_NOFILL</constant> indica que el arco
|
|
o cuerda deberían estar perfilados, no rellenados. <constant>IMG_ARC_EDGED</constant>,
|
|
usado junto con <constant>IMG_ARC_NOFILL</constant>, indica que los
|
|
ángulos de inicio y finalización deberían estar conectados con el centro - esta es una
|
|
buena manera de perfilar (en vez de rellenar) un 'trozo de tarta'.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Crear una gráfico de tarta en 3D</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// crear imagen
|
|
$imagen = imagecreatetruecolor(100, 100);
|
|
|
|
// asignar algunos colores
|
|
$blanco = imagecolorallocate($imagen, 0xFF, 0xFF, 0xFF);
|
|
$gris = imagecolorallocate($imagen, 0xC0, 0xC0, 0xC0);
|
|
$gris_oscuro = imagecolorallocate($imagen, 0x90, 0x90, 0x90);
|
|
$azul_marino = imagecolorallocate($imagen, 0x00, 0x00, 0x80);
|
|
$azul_marino_oscuro = imagecolorallocate($imagen, 0x00, 0x00, 0x50);
|
|
$rojo = imagecolorallocate($imagen, 0xFF, 0x00, 0x00);
|
|
$rojo_oscuro = imagecolorallocate($imagen, 0x90, 0x00, 0x00);
|
|
|
|
// hacer el efecto 3D
|
|
for ($i = 60; $i > 50; $i--) {
|
|
imagefilledarc($imagen, 50, $i, 100, 50, 0, 45, $azul_marino_oscuro, IMG_ARC_PIE);
|
|
imagefilledarc($imagen, 50, $i, 100, 50, 45, 75 , $gris_oscuro, IMG_ARC_PIE);
|
|
imagefilledarc($imagen, 50, $i, 100, 50, 75, 360 , $rojo_oscuro, IMG_ARC_PIE);
|
|
}
|
|
|
|
imagefilledarc($imagen, 50, 50, 100, 50, 0, 45, $azul_marino, IMG_ARC_PIE);
|
|
imagefilledarc($imagen, 50, 50, 100, 50, 45, 75 , $gris, IMG_ARC_PIE);
|
|
imagefilledarc($imagen, 50, 50, 100, 50, 75, 360 , $rojo, IMG_ARC_PIE);
|
|
|
|
|
|
// volcar imagen
|
|
header('Content-type: image/png');
|
|
imagepng($imagen);
|
|
imagedestroy($imagen);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<mediaobject>
|
|
<alt>Salida del ejemplo : Crear un gráfico de tarta en 3D</alt>
|
|
<imageobject>
|
|
<imagedata fileref="en/reference/image/figures/imagefilledarc.png"/>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.gd.2;
|
|
</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
|
|
-->
|