This file is indexed.

/usr/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html is in libcairo2-doc 1.14.0-2.1+deb8u2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cairo_matrix_t</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="cairo-support.html" title="Utilities">
<link rel="prev" href="cairo-support.html" title="Utilities">
<link rel="next" href="cairo-Error-handling.html" title="Error handling">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cairo-support.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cairo-support.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
<td><a accesskey="n" href="cairo-Error-handling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cairo-cairo-matrix-t.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#cairo-cairo-matrix-t.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="cairo-cairo-matrix-t"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cairo-cairo-matrix-t.top_of_page"></a>cairo_matrix_t</span></h2>
<p>cairo_matrix_t — Generic matrix operations</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cairo-cairo-matrix-t.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-init" title="cairo_matrix_init ()">cairo_matrix_init</a>                   (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> xx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> yx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> xy</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> yy</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x0</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y0</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-init-identity" title="cairo_matrix_init_identity ()">cairo_matrix_init_identity</a>          (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-init-translate" title="cairo_matrix_init_translate ()">cairo_matrix_init_translate</a>         (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> ty</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-init-scale" title="cairo_matrix_init_scale ()">cairo_matrix_init_scale</a>             (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-init-rotate" title="cairo_matrix_init_rotate ()">cairo_matrix_init_rotate</a>            (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> radians</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-translate" title="cairo_matrix_translate ()">cairo_matrix_translate</a>              (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> ty</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-scale" title="cairo_matrix_scale ()">cairo_matrix_scale</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-rotate" title="cairo_matrix_rotate ()">cairo_matrix_rotate</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> radians</code></em>);
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-invert" title="cairo_matrix_invert ()">cairo_matrix_invert</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-multiply" title="cairo_matrix_multiply ()">cairo_matrix_multiply</a>               (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *result</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *a</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *b</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-transform-distance" title="cairo_matrix_transform_distance ()">cairo_matrix_transform_distance</a>     (<em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-transform-point" title="cairo_matrix_transform_point ()">cairo_matrix_transform_point</a>        (<em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="cairo-cairo-matrix-t.description"></a><h2>Description</h2>
<p>
<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> is used throughout cairo to convert between different
coordinate spaces.  A <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> holds an affine transformation,
such as a scale, rotation, shear, or a combination of these.
The transformation of a point (<code class="literal">x</code>,<code class="literal">y</code>)
is given by:
</p>
<p>
</p>
<pre class="programlisting">
x_new = xx * x + xy * y + x0;
y_new = yx * x + yy * y + y0;
</pre>
<p>
</p>
<p>
The current transformation matrix of a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, represented as a
<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>, defines the transformation from user-space
coordinates to device-space coordinates. See <a class="link" href="cairo-Transformations.html#cairo-get-matrix" title="cairo_get_matrix ()"><code class="function">cairo_get_matrix()</code></a> and
<a class="link" href="cairo-Transformations.html#cairo-set-matrix" title="cairo_set_matrix ()"><code class="function">cairo_set_matrix()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="cairo-cairo-matrix-t.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="cairo-matrix-t"></a><h3>cairo_matrix_t</h3>
<pre class="programlisting">typedef struct {
    double xx; double yx;
    double xy; double yy;
    double x0; double y0;
} cairo_matrix_t;
</pre>
<p>
A <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> holds an affine transformation, such as a scale,
rotation, shear, or a combination of those. The transformation of
a point (x, y) is given by:
</p>
<pre class="programlisting">
    x_new = xx * x + xy * y + x0;
    y_new = yx * x + yy * y + y0;
</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.xx"></a>xx</code></em>;</span></p></td>
<td>xx component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.yx"></a>yx</code></em>;</span></p></td>
<td>yx component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.xy"></a>xy</code></em>;</span></p></td>
<td>xy component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.yy"></a>yy</code></em>;</span></p></td>
<td>yy component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.x0"></a>x0</code></em>;</span></p></td>
<td>X translation component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-matrix-t.y0"></a>y0</code></em>;</span></p></td>
<td>Y translation component of the affine transformation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-init"></a><h3>cairo_matrix_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_init                   (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> xx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> yx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> xy</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> yy</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x0</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y0</code></em>);</pre>
<p>
Sets <em class="parameter"><code>matrix</code></em> to be the affine transformation given by
<em class="parameter"><code>xx</code></em>, <em class="parameter"><code>yx</code></em>, <em class="parameter"><code>xy</code></em>, <em class="parameter"><code>yy</code></em>, <em class="parameter"><code>x0</code></em>, <em class="parameter"><code>y0</code></em>. The transformation is given
by:
</p>
<pre class="programlisting">
 x_new = xx * x + xy * y + x0;
 y_new = yx * x + yy * y + y0;
</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xx</code></em> :</span></p></td>
<td>xx component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yx</code></em> :</span></p></td>
<td>yx component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xy</code></em> :</span></p></td>
<td>xy component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yy</code></em> :</span></p></td>
<td>yy component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x0</code></em> :</span></p></td>
<td>X translation component of the affine transformation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y0</code></em> :</span></p></td>
<td>Y translation component of the affine transformation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-init-identity"></a><h3>cairo_matrix_init_identity ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_init_identity          (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);</pre>
<p>
Modifies <em class="parameter"><code>matrix</code></em> to be an identity transformation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-init-translate"></a><h3>cairo_matrix_init_translate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_init_translate         (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> ty</code></em>);</pre>
<p>
Initializes <em class="parameter"><code>matrix</code></em> to a transformation that translates by <em class="parameter"><code>tx</code></em> and
<em class="parameter"><code>ty</code></em> in the X and Y dimensions, respectively.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tx</code></em> :</span></p></td>
<td>amount to translate in the X direction</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ty</code></em> :</span></p></td>
<td>amount to translate in the Y direction</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-init-scale"></a><h3>cairo_matrix_init_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_init_scale             (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sy</code></em>);</pre>
<p>
Initializes <em class="parameter"><code>matrix</code></em> to a transformation that scales by <em class="parameter"><code>sx</code></em> and <em class="parameter"><code>sy</code></em>
in the X and Y dimensions, respectively.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sx</code></em> :</span></p></td>
<td>scale factor in the X direction</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sy</code></em> :</span></p></td>
<td>scale factor in the Y direction</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-init-rotate"></a><h3>cairo_matrix_init_rotate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_init_rotate            (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> radians</code></em>);</pre>
<p>
Initialized <em class="parameter"><code>matrix</code></em> to a transformation that rotates by <em class="parameter"><code>radians</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>radians</code></em> :</span></p></td>
<td>angle of rotation, in radians. The direction of rotation
is defined such that positive angles rotate in the direction from
the positive X axis toward the positive Y axis. With the default
axis orientation of cairo, positive angles rotate in a clockwise
direction.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-translate"></a><h3>cairo_matrix_translate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_translate              (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> ty</code></em>);</pre>
<p>
Applies a translation by <em class="parameter"><code>tx</code></em>, <em class="parameter"><code>ty</code></em> to the transformation in
<em class="parameter"><code>matrix</code></em>. The effect of the new transformation is to first translate
the coordinates by <em class="parameter"><code>tx</code></em> and <em class="parameter"><code>ty</code></em>, then apply the original transformation
to the coordinates.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tx</code></em> :</span></p></td>
<td>amount to translate in the X direction</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ty</code></em> :</span></p></td>
<td>amount to translate in the Y direction</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-scale"></a><h3>cairo_matrix_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_scale                  (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> sy</code></em>);</pre>
<p>
Applies scaling by <em class="parameter"><code>sx</code></em>, <em class="parameter"><code>sy</code></em> to the transformation in <em class="parameter"><code>matrix</code></em>. The
effect of the new transformation is to first scale the coordinates
by <em class="parameter"><code>sx</code></em> and <em class="parameter"><code>sy</code></em>, then apply the original transformation to the coordinates.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sx</code></em> :</span></p></td>
<td>scale factor in the X direction</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sy</code></em> :</span></p></td>
<td>scale factor in the Y direction</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-rotate"></a><h3>cairo_matrix_rotate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_rotate                 (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> radians</code></em>);</pre>
<p>
Applies rotation by <em class="parameter"><code>radians</code></em> to the transformation in
<em class="parameter"><code>matrix</code></em>. The effect of the new transformation is to first rotate the
coordinates by <em class="parameter"><code>radians</code></em>, then apply the original transformation
to the coordinates.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>radians</code></em> :</span></p></td>
<td>angle of rotation, in radians. The direction of rotation
is defined such that positive angles rotate in the direction from
the positive X axis toward the positive Y axis. With the default
axis orientation of cairo, positive angles rotate in a clockwise
direction.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-invert"></a><h3>cairo_matrix_invert ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      cairo_matrix_invert                 (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);</pre>
<p>
Changes <em class="parameter"><code>matrix</code></em> to be the inverse of its original value. Not
all transformation matrices have inverses; if the matrix
collapses points together (it is <em class="firstterm">degenerate</em>),
then it has no inverse and this function will fail.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>If <em class="parameter"><code>matrix</code></em> has an inverse, modifies <em class="parameter"><code>matrix</code></em> to
be the inverse matrix and returns <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>. Otherwise,
returns <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MATRIX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-multiply"></a><h3>cairo_matrix_multiply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_multiply               (<em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *result</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *a</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *b</code></em>);</pre>
<p>
Multiplies the affine transformations in <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> together
and stores the result in <em class="parameter"><code>result</code></em>. The effect of the resulting
transformation is to first apply the transformation in <em class="parameter"><code>a</code></em> to the
coordinates and then apply the transformation in <em class="parameter"><code>b</code></em> to the
coordinates.
</p>
<p>
It is allowable for <em class="parameter"><code>result</code></em> to be identical to either <em class="parameter"><code>a</code></em> or <em class="parameter"><code>b</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> in which to store the result</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-transform-distance"></a><h3>cairo_matrix_transform_distance ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_transform_distance     (<em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dx</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dy</code></em>);</pre>
<p>
Transforms the distance vector (<em class="parameter"><code>dx</code></em>,<em class="parameter"><code>dy</code></em>) by <em class="parameter"><code>matrix</code></em>. This is
similar to <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-transform-point" title="cairo_matrix_transform_point ()"><code class="function">cairo_matrix_transform_point()</code></a> except that the translation
components of the transformation are ignored. The calculation of
the returned vector is as follows:
</p>
<p>
</p>
<pre class="programlisting">
dx2 = dx1 * a + dy1 * c;
dy2 = dx1 * b + dy1 * d;
</pre>
<p>
</p>
<p>
Affine transformations are position invariant, so the same vector
always transforms to the same vector. If (<em class="parameter"><code>x1</code></em>,<em class="parameter"><code>y1</code></em>) transforms
to (<em class="parameter"><code>x2</code></em>,<em class="parameter"><code>y2</code></em>) then (<em class="parameter"><code>x1</code></em>+<em class="parameter"><code>dx1</code></em>,<em class="parameter"><code>y1</code></em>+<em class="parameter"><code>dy1</code></em>) will transform to
(<em class="parameter"><code>x1</code></em>+<em class="parameter"><code>dx2</code></em>,<em class="parameter"><code>y1</code></em>+<em class="parameter"><code>dy2</code></em>) for all values of <em class="parameter"><code>x1</code></em> and <em class="parameter"><code>x2</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dx</code></em> :</span></p></td>
<td>X component of a distance vector. An in/out parameter</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dy</code></em> :</span></p></td>
<td>Y component of a distance vector. An in/out parameter</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-matrix-transform-point"></a><h3>cairo_matrix_transform_point ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_matrix_transform_point        (<em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y</code></em>);</pre>
<p>
Transforms the point (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) by <em class="parameter"><code>matrix</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X position. An in/out parameter</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y position. An in/out parameter</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
</div>
<div class="refsect1">
<a name="cairo-cairo-matrix-t.see-also"></a><h2>See Also</h2>
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>