php-doc-en/reference/cairo/cairocontext/arcnegative.xml
2010-02-03 13:03:22 +00:00

181 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="cairocontext.arcnegative" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>CairoContext::arcNegative</refname>
<refname>cairo_arc_negative</refname>
<refpurpose>Adds a negative arc</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Object oriented style (method):</para>
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>CairoContext::arcNegative</methodname>
<methodparam><type>float</type><parameter>x</parameter></methodparam>
<methodparam><type>float</type><parameter>y</parameter></methodparam>
<methodparam><type>float</type><parameter>radius</parameter></methodparam>
<methodparam><type>float</type><parameter>angle1</parameter></methodparam>
<methodparam><type>float</type><parameter>angle2</parameter></methodparam>
</methodsynopsis>
<para>Procedural style:</para>
<methodsynopsis>
<type>void</type><methodname>cairo_arc_negative</methodname>
<methodparam><type>CairoContext</type><parameter>context</parameter></methodparam>
<methodparam><type>float</type><parameter>x</parameter></methodparam>
<methodparam><type>float</type><parameter>y</parameter></methodparam>
<methodparam><type>float</type><parameter>radius</parameter></methodparam>
<methodparam><type>float</type><parameter>angle1</parameter></methodparam>
<methodparam><type>float</type><parameter>angle2</parameter></methodparam>
</methodsynopsis>
<para>
Adds a circular arc of the given <parameter>radius</parameter> to the current path.
The arc is centered at (<parameter>x</parameter>, <parameter>y</parameter>), begins at
<parameter>angle1</parameter> and proceeds in the direction of decreasing angles to end at
<parameter>angle2</parameter>. If <parameter>angle2</parameter> is greater than
<parameter>angle1</parameter> it will be progressively decreased by 2*M_PI until it is less than
<parameter>angle1</parameter>.
See <methodname>CairoContext::arc</methodname> or <function>cairo_arc</function> for more details.
This function differs only in the direction of the arc between the two angles.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>context</parameter></term>
<listitem>
<para>
A valid CairoContext object
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>x</parameter></term>
<listitem>
<para>
double x position
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>y</parameter></term>
<listitem>
<para>
double y position
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>radius</parameter></term>
<listitem>
<para>
The radius of the desired negative arc
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>angle1</parameter></term>
<listitem>
<para>
Start angle of the arc
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>angle2</parameter></term>
<listitem>
<para>
End angle of the arc
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Object oriented style</title>
<programlisting role="php">
<![CDATA[
<?php
// Creates the CairoSurface
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
// Get the cairo context
$context = new CairoContext($surface);
// Appends the arc
$context->arcNegative(0, 0, 1, 0, 2 * M_PI);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Procedural style</title>
<programlisting role="php">
<![CDATA[
<?php
// Creates the CairoSurface
$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
// Get the cairo context
$context = cairo_create($surface);
// Appends the arc
cairo_arc_negative($context, 0, 0, 1, 0, 2 * M_PI);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>CairoContext::arc</methodname></member>
</simplelist>
</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:"~/.phpdoc/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
-->