mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 13:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129245 c90b9560-bf6c-de11-be94-00142212c4b1
86 lines
2.7 KiB
XML
86 lines
2.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 -->
|
|
<refentry id="function.imagearc">
|
|
<refnamediv>
|
|
<refname>imagearc</refname>
|
|
<refpurpose>Draw a partial ellipse</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</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>w</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>h</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>s</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>e</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>color</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagearc</function> draws a partial ellipse centered at
|
|
<parameter>cx</parameter>, <parameter>cy</parameter> (top left is
|
|
0, 0) in the image represented by <parameter>image</parameter>.
|
|
<parameter>W</parameter>
|
|
and <parameter>h</parameter> specifies the ellipse's width and
|
|
height respectively while the start and end points are specified
|
|
in degrees indicated by the <parameter>s</parameter> and
|
|
<parameter>e</parameter> arguments. 0° is located at the three-o'clock
|
|
position, and the arc is drawn counter-clockwise.
|
|
</para>
|
|
<example>
|
|
<title>Drawing a circle with <function>imagearc</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// create a 200*200 image
|
|
$img = imagecreate(200, 200);
|
|
|
|
// allocate some colors
|
|
$white = imagecolorallocate($img, 255, 255, 255);
|
|
|
|
// draw a white circle
|
|
imagearc($img, 100, 100, 150, 150, 0, 360, $white);
|
|
|
|
// output image in the browser
|
|
header("Content-type: image/png");
|
|
imagepng($img);
|
|
|
|
// free memory
|
|
imagedestroy($img);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<para>
|
|
See also <function>imageellipse</function>,
|
|
<function>imagefilledellipse</function>, and
|
|
<function>imagefilledarc</function>.
|
|
</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:"../../../../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
|
|
-->
|