2009-09-30 15:20:52 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-11-18 08:10:04 +00:00
|
|
|
<!-- $Revision$ -->
|
2009-09-30 15:20:52 +00:00
|
|
|
|
|
|
|
<refentry xml:id="cairomatrix.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
2009-10-05 18:19:57 +00:00
|
|
|
<refname>CairoMatrix::__construct</refname>
|
2009-10-01 17:42:16 +00:00
|
|
|
<refname>cairo_matrix_init</refname>
|
|
|
|
<refpurpose>Creates a new CairoMatrix object</refpurpose>
|
2009-09-30 15:20:52 +00:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2012-01-11 06:50:17 +00:00
|
|
|
<para>&style.oop; (method):</para>
|
2009-09-30 15:20:52 +00:00
|
|
|
<methodsynopsis>
|
2012-01-08 05:33:58 +00:00
|
|
|
<modifier>public</modifier> <methodname>CairoMatrix::__construct</methodname>
|
2009-11-23 12:02:15 +00:00
|
|
|
<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>
|
2009-10-01 17:42:16 +00:00
|
|
|
</methodsynopsis>
|
2012-01-11 06:50:17 +00:00
|
|
|
<para>&style.procedural;:</para>
|
2009-10-01 17:42:16 +00:00
|
|
|
<methodsynopsis>
|
2009-10-05 18:19:57 +00:00
|
|
|
<type>object</type><methodname>cairo_matrix_init</methodname>
|
2009-11-23 12:02:15 +00:00
|
|
|
<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>
|
2009-09-30 15:20:52 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
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;
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
2009-10-01 17:42:16 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>xx</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
xx component of the affine transformation
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>yx</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
yx component of the affine transformation
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>xy</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
xy component of the affine transformation
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>yy</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
yy component of the affine transformation
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>x0</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
X translation component of the affine transformation
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>y0</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
Y translation component of the affine transformation
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
2009-10-01 17:42:16 +00:00
|
|
|
Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.
|
2009-09-30 15:20:52 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2009-10-01 17:42:16 +00:00
|
|
|
<refsect1 role="examples">
|
2009-09-30 15:20:52 +00:00
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
2012-01-11 06:50:17 +00:00
|
|
|
<title>&style.oop;</title>
|
2009-09-30 15:20:52 +00:00
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2009-10-01 17:42:16 +00:00
|
|
|
/* Create a new Matrix */
|
|
|
|
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
|
2009-09-30 15:20:52 +00:00
|
|
|
?>
|
|
|
|
]]>
|
2009-10-01 17:42:16 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<example>
|
2012-01-11 06:50:17 +00:00
|
|
|
<title>&style.procedural;</title>
|
2009-10-01 17:42:16 +00:00
|
|
|
<programlisting role="php">
|
2009-09-30 15:20:52 +00:00
|
|
|
<![CDATA[
|
2009-10-01 17:42:16 +00:00
|
|
|
<?php
|
|
|
|
/* Create a new Matrix */
|
|
|
|
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
|
|
|
|
?>
|
2009-09-30 15:20:52 +00:00
|
|
|
]]>
|
2009-10-01 17:42:16 +00:00
|
|
|
</programlisting>
|
2009-09-30 15:20:52 +00:00
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2009-10-01 17:42:16 +00:00
|
|
|
|
2009-09-30 15:20:52 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
2009-10-01 17:42:16 +00:00
|
|
|
<member><methodname>CairoMatrix::initIdentity</methodname></member>
|
|
|
|
<member><methodname>CairoMatrix::initRotate</methodname></member>
|
|
|
|
<member><methodname>CairoMatrix::initScale</methodname></member>
|
|
|
|
<member><methodname>CairoMatrix::initTranslate</methodname></member>
|
2009-09-30 15:20:52 +00:00
|
|
|
</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
|
2010-02-03 13:03:22 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2009-09-30 15:20:52 +00:00
|
|
|
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
|
|
|
|
-->
|