examples added

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@140344 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2003-09-15 09:42:05 +00:00
parent 1b954bf1ed
commit 1a693f2897
3 changed files with 137 additions and 27 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.65 -->
<refentry id="function.pdf-arc">
<refnamediv>
@ -17,16 +17,51 @@
<methodparam><type>float</type><parameter>alpha</parameter></methodparam>
<methodparam><type>float</type><parameter>beta</parameter></methodparam>
</methodsynopsis>
<para>
Draw a counterclockwise circular arc with center (<parameter>x</parameter>,
<parameter>y</parameter>) and radius <parameter>r</parameter> from
<parameter>alpha</parameter> to <parameter>beta</parameter> degrees.
&return.success;
</para>
<para>
See also <function>pdf_arcn</function> and
<function>pdf_circle</function>.
</para>
<para>
Add a counterclockwise 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>
See also: <function>pdf_arcn</function>,
<function>pdf_circle</function>, <function>pdf_stroke</function>,
<function>pdf_fill</function> and <function>pdf_fill_stroke</function>.
</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 arc
pdf_arc($pdf, 200, 700, 100, 0, 90);
pdf_stroke($pdf);
// a filled arc
pdf_arc($pdf, 200, 700, 50, 0, 90);
pdf_fill($pdf);
// an outlined and filled arc
pdf_setcolor($pdf, "fill", "gray", 0.8);
pdf_arc($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>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
<refentry id="function.pdf-arcn">
<refnamediv>
@ -17,16 +17,51 @@
<methodparam><type>float</type><parameter>alpha</parameter></methodparam>
<methodparam><type>float</type><parameter>beta</parameter></methodparam>
</methodsynopsis>
<para>
Draw a clockwise circular arc with center (<parameter>x</parameter>,
<parameter>y</parameter>) and radius <parameter>r</parameter> from
<parameter>alpha</parameter> to <parameter>beta</parameter> degrees.
&return.success;
</para>
<para>
See also <function>pdf_arc</function> and
<function>pdf_circle</function>.
</para>
<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>
See also: <function>pdf_arc</function>, <function>pdf_circle</function>,
<function>pdf_stroke</function>, <function>pdf_fill</function> and
<function>pdf_fillstroke</function>.
</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>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
<refentry id="function.pdf-circle">
<refnamediv>
@ -16,12 +16,52 @@
<methodparam><type>float</type><parameter>r</parameter></methodparam>
</methodsynopsis>
<para>
Draw a circle with center (<parameter>x</parameter>, <parameter>y</parameter>)
and radius <parameter>r</parameter>. &return.success;
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>
See also <function>pdf_arc</function> and
<function>pdf_arcn</function>.
&return.success;
</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>
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>