reference/image/functions/imageaffinematrixget.xml
593ea510e853ff034e03f78a4be0daa41661c9d4
...
...
@@ -1,25 +1,21 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="function.imageaffinematrixget" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>imageaffinematrixget</refname>
7
-
<refpurpose>Return an image containing the affine tramsformed src image, using an optional clipping area</refpurpose>
6
+
<refpurpose>Get an affine transformation matrix</refpurpose>
8
7
</refnamediv>
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
11
<methodsynopsis>
13
-
<type>array</type><methodname>imageaffinematrixget</methodname>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>imageaffinematrixget</methodname>
14
13
<methodparam><type>int</type><parameter>type</parameter></methodparam>
15
-
<methodparam choice="opt"><type>mixed</type><parameter>options</parameter></methodparam>
14
+
<methodparam><type class="union"><type>array</type><type>float</type></type><parameter>options</parameter></methodparam>
16
15
</methodsynopsis>
17
16
<para>
18
-

17
+
Returns an affine transformation matrix.
19
18
</para>
20
-

21
-
&warn.undocumented.func;
22
-

23
19
</refsect1>
24
20

25
21
<refsect1 role="parameters">
...
...
@@ -29,7 +25,7 @@
29
25
<term><parameter>type</parameter></term>
30
26
<listitem>
31
27
<para>
32
-
One of <constant>IMG_AFFINE_*</constant> constants.
28
+
One of the <constant>IMG_AFFINE_*</constant> constants.
33
29
</para>
34
30
</listitem>
35
31
</varlistentry>
...
...
@@ -37,7 +33,15 @@
37
33
<term><parameter>options</parameter></term>
38
34
<listitem>
39
35
<para>
40
-
36
+
If <parameter>type</parameter> is <constant>IMG_AFFINE_TRANSLATE</constant>
37
+
or <constant>IMG_AFFINE_SCALE</constant>,
38
+
<parameter>options</parameter> has to be an <type>array</type> with keys <literal>x</literal>
39
+
and <literal>y</literal>, both having <type>float</type> values.
40
+
</para>
41
+
<para>
42
+
If <parameter>type</parameter> is <constant>IMG_AFFINE_ROTATE</constant>,
43
+
<constant>IMG_AFFINE_SHEAR_HORIZONTAL</constant> or <constant>IMG_AFFINE_SHEAR_VERTICAL</constant>,
44
+
<parameter>options</parameter> has to be a <type>float</type> specifying the angle.
41
45
</para>
42
46
</listitem>
43
47
</varlistentry>
...
...
@@ -47,13 +51,52 @@
47
51
<refsect1 role="returnvalues">
48
52
&reftitle.returnvalues;
49
53
<para>
50
-
Array with keys 0 to 5 and float values&return.falseforfailure;.
54
+
An affine transformation matrix (an array with keys
55
+
<literal>0</literal> to <literal>5</literal> and float values)
56
+
&return.falseforfailure;.
51
57
</para>
52
58
</refsect1>
53
59

60
+
<refsect1 role="examples">
61
+
&reftitle.examples;
62
+
<para>
63
+
<example>
64
+
<title><function>imageaffinematrixget</function> example</title>
65
+
<programlisting role="php">
66
+
<![CDATA[
67
+
<?php
68
+
$matrix = imageaffinematrixget(IMG_AFFINE_TRANSLATE, array('x' => 2, 'y' => 3));
69
+
print_r($matrix);
70
+
?>
71
+
]]>
72
+
</programlisting>
73
+
&example.outputs;
74
+
<screen>
75
+
<![CDATA[
76
+
Array
77
+
(
78
+
[0] => 1
79
+
[1] => 0
80
+
[2] => 0
81
+
[3] => 1
82
+
[4] => 2
83
+
[5] => 3
84
+
)
85
+
]]>
86
+
</screen>
87
+
</example>
88
+
</para>
89
+
</refsect1>
54
90

55
-
</refentry>
91
+
<refsect1 role="seealso">
92
+
&reftitle.seealso;
93
+
<simplelist>
94
+
<member><function>imageaffine</function></member>
95
+
<member><function>imageaffinematrixconcat</function></member>
96
+
</simplelist>
97
+
</refsect1>
56
98

99
+
</refentry>
57
100
<!-- Keep this comment at the end of the file
58
101
Local variables:
59
102
mode: sgml
60
103