File: classCairo_1_1Matrix.html

package info (click to toggle)
cairomm 1.12.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 6,836 kB
  • sloc: cpp: 5,924; sh: 4,228; perl: 236; makefile: 164
file content (655 lines) | stat: -rw-r--r-- 34,889 bytes parent folder | download
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
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>cairomm: Cairo::Matrix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">cairomm
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceCairo.html">Cairo</a></li><li class="navelem"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#related">Related Functions</a> &#124;
<a href="classCairo_1_1Matrix-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Cairo::Matrix Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A Transformation matrix.  
 <a href="classCairo_1_1Matrix.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Cairo::Matrix:</div>
<div class="dyncontent">
<div class="center"><img src="classCairo_1_1Matrix__inherit__graph.png" border="0" usemap="#Cairo_1_1Matrix_inherit__map" alt="Inheritance graph"/></div>
<map name="Cairo_1_1Matrix_inherit__map" id="Cairo_1_1Matrix_inherit__map">
<area shape="rect" id="node2" href="classcairo__matrix__t.html" title="See the cairo_matrix_t reference in the cairo manual for more information. " alt="" coords="5,5,119,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a69297a4b8adc2bdecece4c372edc1e63"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a69297a4b8adc2bdecece4c372edc1e63">Matrix</a> ()</td></tr>
<tr class="memdesc:a69297a4b8adc2bdecece4c372edc1e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an uninitialized matrix.  <a href="#a69297a4b8adc2bdecece4c372edc1e63">More...</a><br /></td></tr>
<tr class="separator:a69297a4b8adc2bdecece4c372edc1e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90a6fe36d7744bfd607c2b37435ca8e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a90a6fe36d7744bfd607c2b37435ca8e6">Matrix</a> (double xx, double yx, double xy, double yy, double x0, double y0)</td></tr>
<tr class="memdesc:a90a6fe36d7744bfd607c2b37435ca8e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a matrix Sets to be the affine transformation given by xx, yx, xy, yy, x0, y0.  <a href="#a90a6fe36d7744bfd607c2b37435ca8e6">More...</a><br /></td></tr>
<tr class="separator:a90a6fe36d7744bfd607c2b37435ca8e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec65d01b5251144dc20708f0b05940f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#aec65d01b5251144dc20708f0b05940f6">translate</a> (double tx, double ty)</td></tr>
<tr class="memdesc:aec65d01b5251144dc20708f0b05940f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a translation by tx, ty to the transformation in matrix.  <a href="#aec65d01b5251144dc20708f0b05940f6">More...</a><br /></td></tr>
<tr class="separator:aec65d01b5251144dc20708f0b05940f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a697c488fb323f4a6edda4edd0533c95c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a697c488fb323f4a6edda4edd0533c95c">scale</a> (double sx, double sy)</td></tr>
<tr class="memdesc:a697c488fb323f4a6edda4edd0533c95c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies scaling by sx, sy to the transformation in matrix.  <a href="#a697c488fb323f4a6edda4edd0533c95c">More...</a><br /></td></tr>
<tr class="separator:a697c488fb323f4a6edda4edd0533c95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98b3feae5ff15937c764ebec846efb33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a98b3feae5ff15937c764ebec846efb33">rotate</a> (double radians)</td></tr>
<tr class="memdesc:a98b3feae5ff15937c764ebec846efb33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies rotation by radians to the transformation in matrix.  <a href="#a98b3feae5ff15937c764ebec846efb33">More...</a><br /></td></tr>
<tr class="separator:a98b3feae5ff15937c764ebec846efb33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ad532fa3b90ac4019d6a535ffde0cd4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a3ad532fa3b90ac4019d6a535ffde0cd4">invert</a> ()</td></tr>
<tr class="memdesc:a3ad532fa3b90ac4019d6a535ffde0cd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes matrix to be the inverse of it's original value.  <a href="#a3ad532fa3b90ac4019d6a535ffde0cd4">More...</a><br /></td></tr>
<tr class="separator:a3ad532fa3b90ac4019d6a535ffde0cd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a748df1dafe6a35422fa51b31f6932587"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a748df1dafe6a35422fa51b31f6932587">multiply</a> (<a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp; a, <a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp; b)</td></tr>
<tr class="memdesc:a748df1dafe6a35422fa51b31f6932587"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies the affine transformations in a and b together and stores the result in this matrix.  <a href="#a748df1dafe6a35422fa51b31f6932587">More...</a><br /></td></tr>
<tr class="separator:a748df1dafe6a35422fa51b31f6932587"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7966181b002249878a895bb3911f39e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a7966181b002249878a895bb3911f39e8">transform_distance</a> (double&amp; dx, double&amp; dy) const </td></tr>
<tr class="memdesc:a7966181b002249878a895bb3911f39e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms the distance vector (dx,dy) by matrix.  <a href="#a7966181b002249878a895bb3911f39e8">More...</a><br /></td></tr>
<tr class="separator:a7966181b002249878a895bb3911f39e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0b0ac8dd645036fdd4a3ee54cdcaca6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#af0b0ac8dd645036fdd4a3ee54cdcaca6">transform_point</a> (double&amp; x, double&amp; y) const </td></tr>
<tr class="memdesc:af0b0ac8dd645036fdd4a3ee54cdcaca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms the point (x, y) by this matrix.  <a href="#af0b0ac8dd645036fdd4a3ee54cdcaca6">More...</a><br /></td></tr>
<tr class="separator:af0b0ac8dd645036fdd4a3ee54cdcaca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr class="memitem:a293cbaf13eb86244648cb558b2cf7dd3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a293cbaf13eb86244648cb558b2cf7dd3">identity_matrix</a> ()</td></tr>
<tr class="memdesc:a293cbaf13eb86244648cb558b2cf7dd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to the identity matrix.  <a href="#a293cbaf13eb86244648cb558b2cf7dd3">More...</a><br /></td></tr>
<tr class="separator:a293cbaf13eb86244648cb558b2cf7dd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae638d4c68c7f26f9760335eb42680cea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#ae638d4c68c7f26f9760335eb42680cea">translation_matrix</a> (double tx, double ty)</td></tr>
<tr class="memdesc:ae638d4c68c7f26f9760335eb42680cea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that translates by tx and ty in the X and Y dimensions, respectively.  <a href="#ae638d4c68c7f26f9760335eb42680cea">More...</a><br /></td></tr>
<tr class="separator:ae638d4c68c7f26f9760335eb42680cea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac217befdf043bdb5f1c29632e60cbdef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#ac217befdf043bdb5f1c29632e60cbdef">scaling_matrix</a> (double sx, double sy)</td></tr>
<tr class="memdesc:ac217befdf043bdb5f1c29632e60cbdef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that scales by sx and sy in the X and Y dimensions, respectively.  <a href="#ac217befdf043bdb5f1c29632e60cbdef">More...</a><br /></td></tr>
<tr class="separator:ac217befdf043bdb5f1c29632e60cbdef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a324cadc45a2fe7424cb0d0d6b73ccbe8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#a324cadc45a2fe7424cb0d0d6b73ccbe8">rotation_matrix</a> (double radians)</td></tr>
<tr class="memdesc:a324cadc45a2fe7424cb0d0d6b73ccbe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that rotates by radians.  <a href="#a324cadc45a2fe7424cb0d0d6b73ccbe8">More...</a><br /></td></tr>
<tr class="separator:a324cadc45a2fe7424cb0d0d6b73ccbe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0bbb2ec9c1451f42f0270652df8cada"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Matrix.html#ab0bbb2ec9c1451f42f0270652df8cada">operator*</a> (const <a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp; a, const <a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp; b)</td></tr>
<tr class="memdesc:ab0bbb2ec9c1451f42f0270652df8cada"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies the affine transformations in a and b together and returns the result.  <a href="#ab0bbb2ec9c1451f42f0270652df8cada">More...</a><br /></td></tr>
<tr class="separator:ab0bbb2ec9c1451f42f0270652df8cada"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A Transformation matrix. </p>
<p><a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Cairo::Matrix</a> is used throughout cairomm to convert between different coordinate spaces. A <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> holds an affine transformation, such as a scale, rotation, shear, or a combination of these. The transformation of a point (x,y) is given by:</p>
<div class="fragment"><div class="line">x_new = xx * x + xy * y + x0;</div>
<div class="line">y_new = yx * x + yy * y + y0;</div>
</div><!-- fragment --><p>The current transformation matrix of a <a class="el" href="classCairo_1_1Context.html" title="Context is the main class used to draw in cairomm. ">Context</a>, represented as a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a>, defines the transformation from user-space coordinates to device-space coordinates. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classCairo_1_1Context.html#a03b21f4a3a44e28086c3a25075fdcea1" title="Stores the current transformation matrix (CTM) into matrix. ">Context::get_matrix()</a> </dd>
<dd>
<a class="el" href="classCairo_1_1Context.html#ac2eafbac5591e569d22495f7920d60d2" title="Modifies the current transformation matrix (CTM) by setting it equal to matrix. ">Context::set_matrix()</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a69297a4b8adc2bdecece4c372edc1e63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::Matrix::Matrix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates an uninitialized matrix. </p>
<p>If you want a matrix initialized to a certain value, either specify the values explicitly with the other constructor or use one of the free functions for initializing matrices with specific scales, rotations, etc.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCairo_1_1Matrix.html#a293cbaf13eb86244648cb558b2cf7dd3" title="Returns a Matrix initialized to the identity matrix. ">identity_matrix()</a> </dd>
<dd>
<a class="el" href="classCairo_1_1Matrix.html#a324cadc45a2fe7424cb0d0d6b73ccbe8" title="Returns a Matrix initialized to a transformation that rotates by radians. ">rotation_matrix()</a> </dd>
<dd>
<a class="el" href="classCairo_1_1Matrix.html#ae638d4c68c7f26f9760335eb42680cea" title="Returns a Matrix initialized to a transformation that translates by tx and ty in the X and Y dimensio...">translation_matrix()</a> </dd>
<dd>
<a class="el" href="classCairo_1_1Matrix.html#ac217befdf043bdb5f1c29632e60cbdef" title="Returns a Matrix initialized to a transformation that scales by sx and sy in the X and Y dimensions...">scaling_matrix()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a90a6fe36d7744bfd607c2b37435ca8e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::Matrix::Matrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>yx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>yy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y0</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a matrix Sets to be the affine transformation given by xx, yx, xy, yy, x0, y0. </p>
<p>The transformation is given by:</p>
<div class="fragment"><div class="line">x_new = xx * x + xy * y + x0;</div>
<div class="line">y_new = yx * x + yy * y + y0;</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">xx</td><td>xx component of the affine transformation </td></tr>
    <tr><td class="paramname">yx</td><td>yx component of the affine transformation </td></tr>
    <tr><td class="paramname">xy</td><td>xy component of the affine transformation </td></tr>
    <tr><td class="paramname">yy</td><td>yy component of the affine transformation </td></tr>
    <tr><td class="paramname">x0</td><td>X translation component of the affine transformation </td></tr>
    <tr><td class="paramname">y0</td><td>Y translation component of the affine transformation </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3ad532fa3b90ac4019d6a535ffde0cd4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::invert </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes matrix to be the inverse of it's original value. </p>
<p>Not all transformation matrices have inverses; if the matrix collapses points together (it is degenerate), then it has no inverse and this function will throw an exception.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a748df1dafe6a35422fa51b31f6932587"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::multiply </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Multiplies the affine transformations in a and b together and stores the result in this matrix. </p>
<p>The effect of the resulting transformation is to first apply the transformation in a to the coordinates and then apply the transformation in b to the coordinates.</p>
<p>It is allowable for result to be identical to either a or b.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> </td></tr>
    <tr><td class="paramname">b</td><td>a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCairo_1_1Matrix.html#ab0bbb2ec9c1451f42f0270652df8cada" title="Multiplies the affine transformations in a and b together and returns the result. ...">operator*()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a98b3feae5ff15937c764ebec846efb33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::rotate </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>radians</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Applies rotation by radians to the transformation in matrix. </p>
<p>The effect of the new transformation is to first rotate the coordinates by radians, then apply the original transformation to the coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">radians</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>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a697c488fb323f4a6edda4edd0533c95c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::scale </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Applies scaling by sx, sy to the transformation in matrix. </p>
<p>The effect of the new transformation is to first scale the coordinates by sx and sy, then apply the original transformation to the coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sx</td><td>scale factor in the X direction </td></tr>
    <tr><td class="paramname">sy</td><td>scale factor in the Y direction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7966181b002249878a895bb3911f39e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::transform_distance </td>
          <td>(</td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>dy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transforms the distance vector (dx,dy) by matrix. </p>
<p>This is similar to <a class="el" href="classCairo_1_1Matrix.html#af0b0ac8dd645036fdd4a3ee54cdcaca6" title="Transforms the point (x, y) by this matrix. ">transform_point()</a> except that the translation components of the transformation are ignored. The calculation of the returned vector is as follows:</p>
<div class="fragment"><div class="line">dx2 = dx1 * a + dy1 * c;</div>
<div class="line">dy2 = dx1 * b + dy1 * d;</div>
</div><!-- fragment --><p>Affine transformations are position invariant, so the same vector always transforms to the same vector. If (x1,y1) transforms to (x2,y2) then (x1+dx1,y1+dy1) will transform to (x1+dx2,y1+dy2) for all values of x1 and x2.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>X component of a distance vector. An in/out parameter </td></tr>
    <tr><td class="paramname">dy</td><td>Y component of a distance vector. An in/out parameter </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af0b0ac8dd645036fdd4a3ee54cdcaca6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::transform_point </td>
          <td>(</td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transforms the point (x, y) by this matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X position. An in/out parameter </td></tr>
    <tr><td class="paramname">y</td><td>Y position. An in/out parameter </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aec65d01b5251144dc20708f0b05940f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cairo::Matrix::translate </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ty</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Applies a translation by tx, ty to the transformation in matrix. </p>
<p>The effect of the new transformation is to first translate the coordinates by tx and ty, then apply the original transformation to the coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx</td><td>amount to translate in the X direction </td></tr>
    <tr><td class="paramname">ty</td><td>amount to translate in the Y direction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a293cbaf13eb86244648cb558b2cf7dd3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a> identity_matrix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to the identity matrix. </p>

</div>
</div>
<a class="anchor" id="ab0bbb2ec9c1451f42f0270652df8cada"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1Matrix.html">Matrix</a>&amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Multiplies the affine transformations in a and b together and returns the result. </p>
<p>The effect of the resulting transformation is to first apply the transformation in a to the coordinates and then apply the transformation in b to the coordinates.</p>
<p>It is allowable for result to be identical to either a or b.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> </td></tr>
    <tr><td class="paramname">b</td><td>a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a324cadc45a2fe7424cb0d0d6b73ccbe8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a> rotation_matrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>radians</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that rotates by radians. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">radians</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>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac217befdf043bdb5f1c29632e60cbdef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a> scaling_matrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that scales by sx and sy in the X and Y dimensions, respectively. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sx</td><td>scale factor in the X direction </td></tr>
    <tr><td class="paramname">sy</td><td>scale factor in the Y direction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae638d4c68c7f26f9760335eb42680cea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCairo_1_1Matrix.html">Matrix</a> translation_matrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ty</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a <a class="el" href="classCairo_1_1Matrix.html" title="A Transformation matrix. ">Matrix</a> initialized to a transformation that translates by tx and ty in the X and Y dimensions, respectively. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx</td><td>amount to translate in the X direction </td></tr>
    <tr><td class="paramname">ty</td><td>amount to translate in the Y direction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>cairomm/matrix.h</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 15 2016 12:52:12 for cairomm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>