mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added documentation and examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299113 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
503c562c51
commit
776f004268
3 changed files with 93 additions and 34 deletions
|
@ -109,6 +109,7 @@ int(3)
|
|||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>CairoContext::setAntialias</methodname></member>
|
||||
<member><classname>CairoAntialias</classname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -7,27 +7,42 @@
|
|||
<refname>cairo_get_current_point</refname>
|
||||
<refpurpose>The getCurrentPoint purpose</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style (method):</para>
|
||||
<methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>CairoContext::getCurrentPoint</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
</methodsynopsis>
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>cairo_get_current_point</methodname>
|
||||
<methodparam><type>CairoContext</type><parameter>context</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Description here.
|
||||
Gets the current point of the current path, which is conceptually the final point reached by the path so far.
|
||||
</para>
|
||||
<para>
|
||||
The current point is returned in the user-space coordinate system. If there is no defined current point or if cr is in an error status, x and y will both be set to 0.0. It is possible to check this in advance with <methodname>CairoContext::hasCurrentPoint</methodname>.
|
||||
</para>
|
||||
<para>
|
||||
Most path construction functions alter the current point. See the following for details on how they affect the current point: <methodname>CairoContext::newPath</methodname>,
|
||||
<methodname>CairoContext::newSubPath</methodname>, <methodname>CairoContext::appendPath</methodname>, <methodname>CairoContext::closePath</methodname>, <methodname>CairoContext::moveTo</methodname>,
|
||||
<methodname>CairoContext::lineTo</methodname>, <methodname>CairoContext::curveTo</methodname>, <methodname>CairoContext::relMoveTo</methodname>,
|
||||
<methodname>CairoContext::relLineTo</methodname>, <methodname>CairoContext::relCurveTo</methodname>,
|
||||
<methodname>CairoContext::arc</methodname>, <methodname>CairoContext::arcNegative</methodname>, <methodname>CairoContext::rectangle</methodname>,
|
||||
<methodname>CairoContext::textPath</methodname>, <methodname>CairoContext::glyphPath</methodname>.
|
||||
</para>
|
||||
<para>
|
||||
Some functions use and alter the current point but do not otherwise change current path: <methodname>CairoContext::showText</methodname>.
|
||||
</para>
|
||||
<para>
|
||||
Some functions unset the current path and as a result, current point: <methodname>CairoContext::fill</methodname>, <methodname>CairoContext::stroke</methodname>.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
|
@ -36,21 +51,21 @@
|
|||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
A valid <classname>CairoContext</classname> object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Description...
|
||||
An array containing the x (index 0) and y (index 1) coordinates of the current point.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -59,14 +74,26 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
|
||||
$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
|
||||
$c = new CairoContext($s);
|
||||
|
||||
$c->moveTo(10, 10);
|
||||
|
||||
var_dump($c->getCurrentPoint());
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
array(2) {
|
||||
[0]=>
|
||||
float(10)
|
||||
[1]=>
|
||||
float(10)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
@ -77,29 +104,42 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
|
||||
$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
|
||||
$c = cairo_create($s);
|
||||
|
||||
cairo_move_to($c, 10, 10);
|
||||
|
||||
var_dump(cairo_get_current_point($c));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
array(2) {
|
||||
[0]=>
|
||||
float(10)
|
||||
[1]=>
|
||||
float(10)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
<member><methodname>CairoContext::moveTo</methodname></member>
|
||||
<member><methodname>CairoContext::hasCurrentPoint</methodname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -21,10 +21,8 @@
|
|||
<methodparam><type>CairoContext</type><parameter>context</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Description here.
|
||||
Returns whether a current point is defined on the current path. See <methodname>CairoContext::getCurrentPoint</methodname> for details on the current point.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
@ -36,7 +34,7 @@
|
|||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
A valid <classname>CairoContext</classname> object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -59,14 +57,24 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
|
||||
$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
|
||||
$c = new CairoContext($s);
|
||||
|
||||
var_dump($c->hasCurrentPoint());
|
||||
|
||||
$c->moveTo(10, 10);
|
||||
|
||||
var_dump($c->hasCurrentPoint());
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
bool(false)
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
@ -77,14 +85,24 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
|
||||
$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
|
||||
$c = cairo_create($s);
|
||||
|
||||
var_dump(cairo_has_current_point($c));
|
||||
|
||||
cairo_move_to($c, 10, 10);
|
||||
|
||||
var_dump(cairo_has_current_point($c));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
bool(false)
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue