hholzgra Mon Sep 15 05:42:06 2003 EDT
Modified files:
/phpdoc/en/reference/pdf/functions pdf-arc.xml pdf-arcn.xml
pdf-circle.xml
Log:
examples added
Index: phpdoc/en/reference/pdf/functions/pdf-arc.xml
diff -u phpdoc/en/reference/pdf/functions/pdf-arc.xml:1.4
phpdoc/en/reference/pdf/functions/pdf-arc.xml:1.5
--- phpdoc/en/reference/pdf/functions/pdf-arc.xml:1.4 Sat Aug 9 00:31:33 2003
+++ phpdoc/en/reference/pdf/functions/pdf-arc.xml Mon Sep 15 05:42:05 2003
@@ -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>
Index: phpdoc/en/reference/pdf/functions/pdf-arcn.xml
diff -u phpdoc/en/reference/pdf/functions/pdf-arcn.xml:1.5
phpdoc/en/reference/pdf/functions/pdf-arcn.xml:1.6
--- phpdoc/en/reference/pdf/functions/pdf-arcn.xml:1.5 Sat Aug 9 00:31:33 2003
+++ phpdoc/en/reference/pdf/functions/pdf-arcn.xml Mon Sep 15 05:42:05 2003
@@ -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>
Index: phpdoc/en/reference/pdf/functions/pdf-circle.xml
diff -u phpdoc/en/reference/pdf/functions/pdf-circle.xml:1.4
phpdoc/en/reference/pdf/functions/pdf-circle.xml:1.5
--- phpdoc/en/reference/pdf/functions/pdf-circle.xml:1.4 Sat Aug 9 00:31:33
2003
+++ phpdoc/en/reference/pdf/functions/pdf-circle.xml Mon Sep 15 05:42:05 2003
@@ -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>