mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322055 c90b9560-bf6c-de11-be94-00142212c4b1
168 lines
5.2 KiB
XML
168 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="cairomatrix.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>CairoMatrix::__construct</refname>
|
|
<refname>cairo_matrix_init</refname>
|
|
<refpurpose>Creates a new CairoMatrix object</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>&style.oop; (method):</para>
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <methodname>CairoMatrix::__construct</methodname>
|
|
<methodparam choice="opt"><type>float</type><parameter>xx</parameter><initializer>1.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>yx</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>xy</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>yy</parameter><initializer>1.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>x0</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>y0</parameter><initializer>0.0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>&style.procedural;:</para>
|
|
<methodsynopsis>
|
|
<type>object</type><methodname>cairo_matrix_init</methodname>
|
|
<methodparam choice="opt"><type>float</type><parameter>xx</parameter><initializer>1.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>yx</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>xy</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>yy</parameter><initializer>1.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>x0</parameter><initializer>0.0</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>y0</parameter><initializer>0.0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns new CairoMatrix object. Matrices are used throughout cairo to convert between different coordinate spaces.
|
|
Sets matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by:
|
|
x_new = xx * x + xy * y + x0; and y_new = yx * x + yy * y + y0;
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>xx</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
xx component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>yx</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
yx component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>xy</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
xy component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>yy</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
yy component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>x0</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
X translation component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>y0</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Y translation component of the affine transformation
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>&style.oop;</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* Create a new Matrix */
|
|
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>&style.procedural;</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* Create a new Matrix */
|
|
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>CairoMatrix::initIdentity</methodname></member>
|
|
<member><methodname>CairoMatrix::initRotate</methodname></member>
|
|
<member><methodname>CairoMatrix::initScale</methodname></member>
|
|
<member><methodname>CairoMatrix::initTranslate</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
|
|
-->
|