Imported Upstream version 2.13.1
[platform/upstream/fontconfig.git] / doc / fcmatrix.sgml
1 <!--
2    fontconfig/doc/func.sgml
3   
4    Copyright © 2003 Keith Packard
5   
6    Permission to use, copy, modify, distribute, and sell this software and its
7    documentation for any purpose is hereby granted without fee, provided that
8    the above copyright notice appear in all copies and that both that
9    copyright notice and this permission notice appear in supporting
10    documentation, and that the name of the author(s) not be used in
11    advertising or publicity pertaining to distribution of the software without
12    specific, written prior permission.  The authors make no
13    representations about the suitability of this software for any purpose.  It
14    is provided "as is" without express or implied warranty.
15   
16    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22    PERFORMANCE OF THIS SOFTWARE.
23  -->
24     <refentry id="FcMatrixInit">
25         <refmeta>
26             <refentrytitle>FcMatrixInit</refentrytitle>
27             <manvolnum>3</manvolnum>
28             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
29         </refmeta>
30         <refnamediv>
31             <refname>FcMatrixInit</refname>
32             <refpurpose>initialize an FcMatrix structure</refpurpose>
33         </refnamediv>
34         <refsynopsisdiv>
35         <funcsynopsis>
36         <funcsynopsisinfo>
37 #include &lt;fontconfig/fontconfig.h&gt;
38         </funcsynopsisinfo>
39         <funcprototype>
40             <funcdef>void <function>FcMatrixInit</function></funcdef>
41                 <paramdef>FcMatrix *<parameter>matrix</parameter></paramdef>
42         </funcprototype>
43         </funcsynopsis>
44         </refsynopsisdiv>
45         <refsect1><title>Description</title>
46             <para>
47 <function>FcMatrixInit</function> initializes <parameter>matrix</parameter>
48 to the identity matrix.
49             </para>
50         </refsect1>
51     </refentry>
52 <!--
53    fontconfig/doc/func.sgml
54   
55    Copyright © 2003 Keith Packard
56   
57    Permission to use, copy, modify, distribute, and sell this software and its
58    documentation for any purpose is hereby granted without fee, provided that
59    the above copyright notice appear in all copies and that both that
60    copyright notice and this permission notice appear in supporting
61    documentation, and that the name of the author(s) not be used in
62    advertising or publicity pertaining to distribution of the software without
63    specific, written prior permission.  The authors make no
64    representations about the suitability of this software for any purpose.  It
65    is provided "as is" without express or implied warranty.
66   
67    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
68    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
69    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
70    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
71    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
72    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
73    PERFORMANCE OF THIS SOFTWARE.
74  -->
75     <refentry id="FcMatrixCopy">
76         <refmeta>
77             <refentrytitle>FcMatrixCopy</refentrytitle>
78             <manvolnum>3</manvolnum>
79             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
80         </refmeta>
81         <refnamediv>
82             <refname>FcMatrixCopy</refname>
83             <refpurpose>Copy a matrix</refpurpose>
84         </refnamediv>
85         <refsynopsisdiv>
86         <funcsynopsis>
87         <funcsynopsisinfo>
88 #include &lt;fontconfig/fontconfig.h&gt;
89         </funcsynopsisinfo>
90         <funcprototype>
91             <funcdef>void <function>FcMatrixCopy</function></funcdef>
92                 <paramdef>const FcMatrix *<parameter>matrix</parameter></paramdef>
93         </funcprototype>
94         </funcsynopsis>
95         </refsynopsisdiv>
96         <refsect1><title>Description</title>
97             <para>
98 <function>FcMatrixCopy</function> allocates a new FcMatrix
99 and copies <parameter>mat</parameter> into it.
100             </para>
101         </refsect1>
102     </refentry>
103 <!--
104    fontconfig/doc/func.sgml
105   
106    Copyright © 2003 Keith Packard
107   
108    Permission to use, copy, modify, distribute, and sell this software and its
109    documentation for any purpose is hereby granted without fee, provided that
110    the above copyright notice appear in all copies and that both that
111    copyright notice and this permission notice appear in supporting
112    documentation, and that the name of the author(s) not be used in
113    advertising or publicity pertaining to distribution of the software without
114    specific, written prior permission.  The authors make no
115    representations about the suitability of this software for any purpose.  It
116    is provided "as is" without express or implied warranty.
117   
118    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
119    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
120    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
121    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
122    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
123    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
124    PERFORMANCE OF THIS SOFTWARE.
125  -->
126     <refentry id="FcMatrixEqual">
127         <refmeta>
128             <refentrytitle>FcMatrixEqual</refentrytitle>
129             <manvolnum>3</manvolnum>
130             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
131         </refmeta>
132         <refnamediv>
133             <refname>FcMatrixEqual</refname>
134             <refpurpose>Compare two matrices</refpurpose>
135         </refnamediv>
136         <refsynopsisdiv>
137         <funcsynopsis>
138         <funcsynopsisinfo>
139 #include &lt;fontconfig/fontconfig.h&gt;
140         </funcsynopsisinfo>
141         <funcprototype>
142             <funcdef>void <function>FcMatrixEqual</function></funcdef>
143                 <paramdef>const FcMatrix *<parameter>matrix1</parameter></paramdef>
144                 <paramdef>const FcMatrix *<parameter>matrix2</parameter></paramdef>
145         </funcprototype>
146         </funcsynopsis>
147         </refsynopsisdiv>
148         <refsect1><title>Description</title>
149             <para>
150 <function>FcMatrixEqual</function> compares <parameter>matrix1</parameter>
151 and <parameter>matrix2</parameter> returning FcTrue when they are equal and
152 FcFalse when they are not.
153             </para>
154         </refsect1>
155     </refentry>
156 <!--
157    fontconfig/doc/func.sgml
158   
159    Copyright © 2003 Keith Packard
160   
161    Permission to use, copy, modify, distribute, and sell this software and its
162    documentation for any purpose is hereby granted without fee, provided that
163    the above copyright notice appear in all copies and that both that
164    copyright notice and this permission notice appear in supporting
165    documentation, and that the name of the author(s) not be used in
166    advertising or publicity pertaining to distribution of the software without
167    specific, written prior permission.  The authors make no
168    representations about the suitability of this software for any purpose.  It
169    is provided "as is" without express or implied warranty.
170   
171    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
172    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
173    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
174    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
175    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
176    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
177    PERFORMANCE OF THIS SOFTWARE.
178  -->
179     <refentry id="FcMatrixMultiply">
180         <refmeta>
181             <refentrytitle>FcMatrixMultiply</refentrytitle>
182             <manvolnum>3</manvolnum>
183             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
184         </refmeta>
185         <refnamediv>
186             <refname>FcMatrixMultiply</refname>
187             <refpurpose>Multiply matrices</refpurpose>
188         </refnamediv>
189         <refsynopsisdiv>
190         <funcsynopsis>
191         <funcsynopsisinfo>
192 #include &lt;fontconfig/fontconfig.h&gt;
193         </funcsynopsisinfo>
194         <funcprototype>
195             <funcdef>void <function>FcMatrixMultiply</function></funcdef>
196                 <paramdef>FcMatrix *<parameter>result</parameter></paramdef>
197                 <paramdef>const FcMatrix *<parameter>matrix1</parameter></paramdef>
198                 <paramdef>const FcMatrix *<parameter>matrix2</parameter></paramdef>
199         </funcprototype>
200         </funcsynopsis>
201         </refsynopsisdiv>
202         <refsect1><title>Description</title>
203             <para>
204 <function>FcMatrixMultiply</function> multiplies
205 <parameter>matrix1</parameter> and <parameter>matrix2</parameter> storing
206 the result in <parameter>result</parameter>.
207             </para>
208         </refsect1>
209     </refentry>
210 <!--
211    fontconfig/doc/func.sgml
212   
213    Copyright © 2003 Keith Packard
214   
215    Permission to use, copy, modify, distribute, and sell this software and its
216    documentation for any purpose is hereby granted without fee, provided that
217    the above copyright notice appear in all copies and that both that
218    copyright notice and this permission notice appear in supporting
219    documentation, and that the name of the author(s) not be used in
220    advertising or publicity pertaining to distribution of the software without
221    specific, written prior permission.  The authors make no
222    representations about the suitability of this software for any purpose.  It
223    is provided "as is" without express or implied warranty.
224   
225    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
226    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
227    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
228    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
229    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
230    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
231    PERFORMANCE OF THIS SOFTWARE.
232  -->
233     <refentry id="FcMatrixRotate">
234         <refmeta>
235             <refentrytitle>FcMatrixRotate</refentrytitle>
236             <manvolnum>3</manvolnum>
237             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
238         </refmeta>
239         <refnamediv>
240             <refname>FcMatrixRotate</refname>
241             <refpurpose>Rotate a matrix</refpurpose>
242         </refnamediv>
243         <refsynopsisdiv>
244         <funcsynopsis>
245         <funcsynopsisinfo>
246 #include &lt;fontconfig/fontconfig.h&gt;
247         </funcsynopsisinfo>
248         <funcprototype>
249             <funcdef>void <function>FcMatrixRotate</function></funcdef>
250                 <paramdef>FcMatrix *<parameter>matrix</parameter></paramdef>
251                 <paramdef>double <parameter>cos</parameter></paramdef>
252                 <paramdef>double <parameter>sin</parameter></paramdef>
253         </funcprototype>
254         </funcsynopsis>
255         </refsynopsisdiv>
256         <refsect1><title>Description</title>
257             <para>
258 <function>FcMatrixRotate</function> rotates <parameter>matrix</parameter>
259 by the angle who's sine is <parameter>sin</parameter> and cosine is
260 <parameter>cos</parameter>.  This is done by multiplying by the
261 matrix:
262 <programlisting>
263   cos -sin
264   sin  cos
265 </programlisting>
266             </para>
267         </refsect1>
268     </refentry>
269 <!--
270    fontconfig/doc/func.sgml
271   
272    Copyright © 2003 Keith Packard
273   
274    Permission to use, copy, modify, distribute, and sell this software and its
275    documentation for any purpose is hereby granted without fee, provided that
276    the above copyright notice appear in all copies and that both that
277    copyright notice and this permission notice appear in supporting
278    documentation, and that the name of the author(s) not be used in
279    advertising or publicity pertaining to distribution of the software without
280    specific, written prior permission.  The authors make no
281    representations about the suitability of this software for any purpose.  It
282    is provided "as is" without express or implied warranty.
283   
284    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
285    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
286    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
287    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
288    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
289    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
290    PERFORMANCE OF THIS SOFTWARE.
291  -->
292     <refentry id="FcMatrixScale">
293         <refmeta>
294             <refentrytitle>FcMatrixScale</refentrytitle>
295             <manvolnum>3</manvolnum>
296             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
297         </refmeta>
298         <refnamediv>
299             <refname>FcMatrixScale</refname>
300             <refpurpose>Scale a matrix</refpurpose>
301         </refnamediv>
302         <refsynopsisdiv>
303         <funcsynopsis>
304         <funcsynopsisinfo>
305 #include &lt;fontconfig/fontconfig.h&gt;
306         </funcsynopsisinfo>
307         <funcprototype>
308             <funcdef>void <function>FcMatrixScale</function></funcdef>
309                 <paramdef>FcMatrix *<parameter>matrix</parameter></paramdef>
310                 <paramdef>double <parameter>sx</parameter></paramdef>
311                 <paramdef>double <parameter>dy</parameter></paramdef>
312         </funcprototype>
313         </funcsynopsis>
314         </refsynopsisdiv>
315         <refsect1><title>Description</title>
316             <para>
317 <function>FcMatrixScale</function> multiplies <parameter>matrix</parameter>
318 x values by <parameter>sx</parameter> and y values by
319 <parameter>dy</parameter>.  This is done by multiplying by
320 the matrix:
321 <programlisting>
322    sx  0
323    0   dy
324 </programlisting>
325             </para>
326         </refsect1>
327     </refentry>
328 <!--
329    fontconfig/doc/func.sgml
330   
331    Copyright © 2003 Keith Packard
332   
333    Permission to use, copy, modify, distribute, and sell this software and its
334    documentation for any purpose is hereby granted without fee, provided that
335    the above copyright notice appear in all copies and that both that
336    copyright notice and this permission notice appear in supporting
337    documentation, and that the name of the author(s) not be used in
338    advertising or publicity pertaining to distribution of the software without
339    specific, written prior permission.  The authors make no
340    representations about the suitability of this software for any purpose.  It
341    is provided "as is" without express or implied warranty.
342   
343    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
344    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
345    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
346    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
347    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
348    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
349    PERFORMANCE OF THIS SOFTWARE.
350  -->
351     <refentry id="FcMatrixShear">
352         <refmeta>
353             <refentrytitle>FcMatrixShear</refentrytitle>
354             <manvolnum>3</manvolnum>
355             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
356         </refmeta>
357         <refnamediv>
358             <refname>FcMatrixShear</refname>
359             <refpurpose>Shear a matrix</refpurpose>
360         </refnamediv>
361         <refsynopsisdiv>
362         <funcsynopsis>
363         <funcsynopsisinfo>
364 #include &lt;fontconfig/fontconfig.h&gt;
365         </funcsynopsisinfo>
366         <funcprototype>
367             <funcdef>void <function>FcMatrixShear</function></funcdef>
368                 <paramdef>FcMatrix *<parameter>matrix</parameter></paramdef>
369                 <paramdef>double <parameter>sh</parameter></paramdef>
370                 <paramdef>double <parameter>sv</parameter></paramdef>
371         </funcprototype>
372         </funcsynopsis>
373         </refsynopsisdiv>
374         <refsect1><title>Description</title>
375             <para>
376 <function>FcMatrixShare</function> shears <parameter>matrix</parameter>
377 horizontally by <parameter>sh</parameter> and vertically by
378 <parameter>sv</parameter>.  This is done by multiplying by
379 the matrix:
380 <programlisting>
381   1  sh
382   sv  1
383 </programlisting>
384             </para>
385         </refsect1>
386     </refentry>