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

CS : examples start at col 0 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147965 c90b9560-bf6c-de11-be94-00142212c4b1
92 lines
2.6 KiB
XML
92 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.9 $ -->
|
|
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
|
|
<refentry id="function.pdf-arcn">
|
|
<refnamediv>
|
|
<refname>pdf_arcn</refname>
|
|
<refpurpose>Draws an arc (clockwise)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>pdf_arcn</methodname>
|
|
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>r</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>alpha</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>beta</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Add a clockwise circular arc from
|
|
<parameter>alpha</parameter> to <parameter>beta</parameter> degrees
|
|
with center (<parameter>x</parameter>; <parameter>y</parameter>)
|
|
and radius <parameter>r</parameter>. Actual drawing of the circle is performed by
|
|
the next stroke or fill operation.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>pdf_arcn</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// prepare document
|
|
$pdf = pdf_new();
|
|
pdf_open_file($pdf, "");
|
|
pdf_begin_page($pdf, 595, 842);
|
|
|
|
// an outlined arcn
|
|
pdf_arcn($pdf, 200, 700, 100, 0, 90);
|
|
pdf_stroke($pdf);
|
|
|
|
// a filled arcn
|
|
pdf_arcn($pdf, 200, 700, 50, 0, 90);
|
|
pdf_fill($pdf);
|
|
|
|
// an outlined and filled arcn
|
|
pdf_setcolor($pdf, "fill", "gray", 0.8);
|
|
pdf_arcn($pdf, 400, 700, 50, 0, 90);
|
|
pdf_fill_stroke($pdf);
|
|
|
|
// finish document
|
|
pdf_end_page($pdf);
|
|
pdf_close($pdf);
|
|
|
|
header("Content-type: application/pdf");
|
|
echo pdf_get_buffer($pdf);
|
|
|
|
pdf_delete($pdf);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
See also: <function>pdf_arc</function>, <function>pdf_circle</function>,
|
|
<function>pdf_stroke</function>, <function>pdf_fill</function> and
|
|
<function>pdf_fillstroke</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
|
|
-->
|