1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
<?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
-->
|