mirror of
https://github.com/php/doc-es.git
synced 2026-03-27 00:42:10 +01:00
Use consistent line terminator. git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@317671 c90b9560-bf6c-de11-be94-00142212c4b1
178 lines
4.8 KiB
XML
178 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 04a0c156efa3fdd2896b4c80a6b644408caf45b6 Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.imagearc" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagearc</refname>
|
|
<refpurpose>Dibujar un arco</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagearc</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>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagearc</function> dibuja un arco de circunferencia con centro en las
|
|
coordenadas dadas.
|
|
</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° está 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>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Dibujar un círculo con <function>imagearc</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// crear una imagen de 200*200
|
|
$img = imagecreatetruecolor(200, 200);
|
|
|
|
// asignar algunos colores
|
|
$blanco = imagecolorallocate($img, 255, 255, 255);
|
|
$rojo = imagecolorallocate($img, 255, 0, 0);
|
|
$verde = imagecolorallocate($img, 0, 255, 0);
|
|
$azul = imagecolorallocate($img, 0, 0, 255);
|
|
|
|
// dibujar la cabeza
|
|
imagearc($img, 100, 100, 200, 200, 0, 360, $blanco);
|
|
// la boca
|
|
imagearc($img, 100, 100, 150, 150, 25, 155, $rojo);
|
|
// el ojo izquierdo y después el ojo derecho
|
|
imagearc($img, 60, 75, 50, 50, 0, 360, $verde);
|
|
imagearc($img, 140, 75, 50, 50, 0, 360, $azul);
|
|
|
|
// imprimir la imagen en el navegador
|
|
header("Content-type: image/png");
|
|
imagepng($img);
|
|
|
|
// liberar memoria
|
|
imagedestroy($img);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<mediaobject>
|
|
<alt>Salida del ejemplo : Dibujar un círculo con imagearc()</alt>
|
|
<imageobject>
|
|
<imagedata fileref="en/reference/image/figures/imagearc.png"/>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>imagefilledarc</function></member>
|
|
<member><function>imageellipse</function></member>
|
|
<member><function>imagefilledellipse</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|