php-doc-en/reference/pdf/functions/pdf-circle.xml
Jakub Vrana 647ee5c6a2 Nuke tabs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165127 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-03 17:25:34 +00:00

92 lines
2.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
<refentry id="function.pdf-circle">
<refnamediv>
<refname>pdf_circle</refname>
<refpurpose>Draws a circle</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>pdf_circle</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>
</methodsynopsis>
<para>
Add a circle with center (<parameter>x</parameter>,
<parameter>y</parameter>) and radius <parameter>r</parameter>
to the current page. Actual drawing of the circle is performed by
the next stroke or fill operation.
</para>
<para>
&return.success;
</para>
<para>
<example>
<title><function>pdf_circle</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 circle
pdf_circle($pdf, 200, 700, 100);
pdf_stroke($pdf);
// a filled circle
pdf_circle($pdf, 200, 700, 50);
pdf_fill($pdf);
// an outlined and filled circle
pdf_setcolor($pdf, "fill", "gray", 0.3);
pdf_circle($pdf, 400, 700, 50);
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_arcn</function>, <function>pdf_curveto</function>,
<function>pdf_stroke</function>, <function>pdf_fill</function> and
<function>pdf_fill_stroke</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
-->