]>
Commit | Line | Data |
---|---|---|
bfc2dc3a | 1 | /* |
e690fbb2 | 2 | * fontconfig/doc/fcmatrix.fncs |
bfc2dc3a | 3 | * |
46b51147 | 4 | * Copyright © 2003 Keith Packard |
bfc2dc3a KP |
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 | |
5aaf466d | 10 | * documentation, and that the name of the author(s) not be used in |
bfc2dc3a | 11 | * advertising or publicity pertaining to distribution of the software without |
5aaf466d | 12 | * specific, written prior permission. The authors make no |
bfc2dc3a KP |
13 | * representations about the suitability of this software for any purpose. It |
14 | * is provided "as is" without express or implied warranty. | |
15 | * | |
3074a73b | 16 | * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
bfc2dc3a | 17 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
3074a73b | 18 | * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
bfc2dc3a KP |
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 | */ | |
a190678e KP |
24 | |
25 | @RET@ void | |
22671e25 KP |
26 | @FUNC@ FcMatrixInit |
27 | @PURPOSE@ initialize an FcMatrix structure | |
28 | @TYPE1@ FcMatrix * | |
29 | @ARG1@ matrix | |
30 | @DESC@ | |
31 | <function>FcMatrixInit</function> initializes <parameter>matrix</parameter> | |
32 | to the identity matrix. | |
33 | @@ | |
34 | ||
35 | @FUNC@ FcMatrixCopy | |
36 | @PURPOSE@ Copy a matrix | |
37 | @TYPE1@ const FcMatrix * | |
38 | @ARG1@ matrix | |
39 | @DESC@ | |
40 | <function>FcMatrixCopy</function> allocates a new FcMatrix | |
41 | and copies <parameter>mat</parameter> into it. | |
42 | @@ | |
43 | ||
44 | @FUNC@ FcMatrixEqual | |
45 | @PURPOSE@ Compare two matrices | |
46 | @TYPE1@ const FcMatrix * | |
47 | @ARG1@ matrix1 | |
48 | @TYPE2@ const FcMatrix * | |
49 | @ARG2@ matrix2 | |
50 | @DESC@ | |
51 | <function>FcMatrixEqual</function> compares <parameter>matrix1</parameter> | |
52 | and <parameter>matrix2</parameter> returning FcTrue when they are equal and | |
53 | FcFalse when they are not. | |
54 | @@ | |
55 | ||
56 | @FUNC@ FcMatrixMultiply | |
57 | @PURPOSE@ Multiply matrices | |
58 | @TYPE1@ FcMatrix * | |
59 | @ARG1@ result | |
60 | @TYPE2@ const FcMatrix * | |
61 | @ARG2@ matrix1 | |
62 | @TYPE3@ const FcMatrix * | |
63 | @ARG3@ matrix2 | |
64 | @DESC@ | |
65 | <function>FcMatrixMultiply</function> multiplies | |
66 | <parameter>matrix1</parameter> and <parameter>matrix2</parameter> storing | |
67 | the result in <parameter>result</parameter>. | |
68 | @@ | |
69 | ||
70 | @FUNC@ FcMatrixRotate | |
71 | @PURPOSE@ Rotate a matrix | |
72 | @TYPE1@ FcMatrix * | |
73 | @ARG1@ matrix | |
61895ed1 | 74 | @TYPE2@ double% |
22671e25 | 75 | @ARG2@ cos |
61895ed1 | 76 | @TYPE3@ double% |
22671e25 KP |
77 | @ARG3@ sin |
78 | @DESC@ | |
79 | <function>FcMatrixRotate</function> rotates <parameter>matrix</parameter> | |
80 | by the angle who's sine is <parameter>sin</parameter> and cosine is | |
81 | <parameter>cos</parameter>. This is done by multiplying by the | |
82 | matrix: | |
83 | <programlisting> | |
84 | cos -sin | |
85 | sin cos | |
86 | </programlisting> | |
87 | @@ | |
88 | ||
89 | @FUNC@ FcMatrixScale | |
90 | @PURPOSE@ Scale a matrix | |
91 | @TYPE1@ FcMatrix * | |
92 | @ARG1@ matrix | |
61895ed1 | 93 | @TYPE2@ double% |
22671e25 | 94 | @ARG2@ sx |
61895ed1 | 95 | @TYPE3@ double% |
22671e25 KP |
96 | @ARG3@ dy |
97 | @DESC@ | |
98 | <function>FcMatrixScale</function> multiplies <parameter>matrix</parameter> | |
99 | x values by <parameter>sx</parameter> and y values by | |
b5617e63 | 100 | <parameter>dy</parameter>. This is done by multiplying by |
22671e25 KP |
101 | the matrix: |
102 | <programlisting> | |
103 | sx 0 | |
b5617e63 | 104 | 0 dy |
22671e25 KP |
105 | </programlisting> |
106 | @@ | |
107 | ||
108 | @FUNC@ FcMatrixShear | |
109 | @PURPOSE@ Shear a matrix | |
110 | @TYPE1@ FcMatrix * | |
111 | @ARG1@ matrix | |
61895ed1 | 112 | @TYPE2@ double% |
22671e25 | 113 | @ARG2@ sh |
61895ed1 | 114 | @TYPE3@ double% |
22671e25 KP |
115 | @ARG3@ sv |
116 | @DESC@ | |
117 | <function>FcMatrixShare</function> shears <parameter>matrix</parameter> | |
118 | horizontally by <parameter>sh</parameter> and vertically by | |
119 | <parameter>sv</parameter>. This is done by multiplying by | |
120 | the matrix: | |
121 | <programlisting> | |
122 | 1 sh | |
123 | sv 1 | |
124 | </programlisting> | |
125 | @@ |