summaryrefslogtreecommitdiff
path: root/doc/public/xml/cairo.xml
blob: 972bdf7fb5d0e77417866d4a7e1b9154c32a39c2 (plain)
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="cairo-cairo-t">
<refmeta>
<refentrytitle>cairo_t</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAIRO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>cairo_t</refname><refpurpose>Drawing contexts.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



typedef     <link linkend="cairo-t">cairo_t</link>;
<link linkend="cairo-t">cairo_t</link>*    <link linkend="cairo-create">cairo_create</link>                    (<link linkend="cairo-surface-t">cairo_surface_t</link> *target);
<link linkend="void">void</link>        <link linkend="cairo-reference">cairo_reference</link>                 (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-destroy">cairo_destroy</link>                   (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-save">cairo_save</link>                      (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-restore">cairo_restore</link>                   (<link linkend="cairo-t">cairo_t</link> *cr);
enum        <link linkend="cairo-content-t">cairo_content_t</link>;
#define     <link linkend="CAIRO-CONTENT-VALID:CAPS">CAIRO_CONTENT_VALID</link>             (content)
enum        <link linkend="cairo-format-t">cairo_format_t</link>;
#define     <link linkend="CAIRO-FORMAT-VALID:CAPS">CAIRO_FORMAT_VALID</link>              (format)
enum        <link linkend="cairo-operator-t">cairo_operator_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-set-operator">cairo_set_operator</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-operator-t">cairo_operator_t</link> op);
<link linkend="void">void</link>        <link linkend="cairo-set-source-rgb">cairo_set_source_rgb</link>            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> red,
                                             <link linkend="double">double</link> green,
                                             <link linkend="double">double</link> blue);
<link linkend="void">void</link>        <link linkend="cairo-set-source-rgba">cairo_set_source_rgba</link>           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> red,
                                             <link linkend="double">double</link> green,
                                             <link linkend="double">double</link> blue,
                                             <link linkend="double">double</link> alpha);
<link linkend="void">void</link>        <link linkend="cairo-set-source">cairo_set_source</link>                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-pattern-t">cairo_pattern_t</link> *source);
<link linkend="void">void</link>        <link linkend="cairo-set-source-surface">cairo_set_source_surface</link>        (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-surface-t">cairo_surface_t</link> *surface,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);
<link linkend="void">void</link>        <link linkend="cairo-set-tolerance">cairo_set_tolerance</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> tolerance);
enum        <link linkend="cairo-fill-rule-t">cairo_fill_rule_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-set-fill-rule">cairo_set_fill_rule</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-fill-rule-t">cairo_fill_rule_t</link> fill_rule);
<link linkend="void">void</link>        <link linkend="cairo-set-line-width">cairo_set_line_width</link>            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> width);
enum        <link linkend="cairo-line-cap-t">cairo_line_cap_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-set-line-cap">cairo_set_line_cap</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-line-cap-t">cairo_line_cap_t</link> line_cap);
enum        <link linkend="cairo-line-join-t">cairo_line_join_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-set-line-join">cairo_set_line_join</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-line-join-t">cairo_line_join_t</link> line_join);
<link linkend="void">void</link>        <link linkend="cairo-set-dash">cairo_set_dash</link>                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dashes,
                                             <link linkend="int">int</link> ndash,
                                             <link linkend="double">double</link> offset);
<link linkend="void">void</link>        <link linkend="cairo-set-miter-limit">cairo_set_miter_limit</link>           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> limit);
<link linkend="void">void</link>        <link linkend="cairo-translate">cairo_translate</link>                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> tx,
                                             <link linkend="double">double</link> ty);
<link linkend="void">void</link>        <link linkend="cairo-scale">cairo_scale</link>                     (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> sx,
                                             <link linkend="double">double</link> sy);
<link linkend="void">void</link>        <link linkend="cairo-rotate">cairo_rotate</link>                    (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> angle);
<link linkend="void">void</link>        <link linkend="cairo-transform">cairo_transform</link>                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);
<link linkend="void">void</link>        <link linkend="cairo-set-matrix">cairo_set_matrix</link>                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);
<link linkend="void">void</link>        <link linkend="cairo-identity-matrix">cairo_identity_matrix</link>           (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-user-to-device">cairo_user_to_device</link>            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);
<link linkend="void">void</link>        <link linkend="cairo-user-to-device-distance">cairo_user_to_device_distance</link>   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dx,
                                             <link linkend="double">double</link> *dy);
<link linkend="void">void</link>        <link linkend="cairo-device-to-user">cairo_device_to_user</link>            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);
<link linkend="void">void</link>        <link linkend="cairo-device-to-user-distance">cairo_device_to_user_distance</link>   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dx,
                                             <link linkend="double">double</link> *dy);
<link linkend="void">void</link>        <link linkend="cairo-new-path">cairo_new_path</link>                  (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-move-to">cairo_move_to</link>                   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);
<link linkend="void">void</link>        <link linkend="cairo-line-to">cairo_line_to</link>                   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);
<link linkend="void">void</link>        <link linkend="cairo-curve-to">cairo_curve_to</link>                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x1,
                                             <link linkend="double">double</link> y1,
                                             <link linkend="double">double</link> x2,
                                             <link linkend="double">double</link> y2,
                                             <link linkend="double">double</link> x3,
                                             <link linkend="double">double</link> y3);
<link linkend="void">void</link>        <link linkend="cairo-arc">cairo_arc</link>                       (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> xc,
                                             <link linkend="double">double</link> yc,
                                             <link linkend="double">double</link> radius,
                                             <link linkend="double">double</link> angle1,
                                             <link linkend="double">double</link> angle2);
<link linkend="void">void</link>        <link linkend="cairo-arc-negative">cairo_arc_negative</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> xc,
                                             <link linkend="double">double</link> yc,
                                             <link linkend="double">double</link> radius,
                                             <link linkend="double">double</link> angle1,
                                             <link linkend="double">double</link> angle2);
<link linkend="void">void</link>        <link linkend="cairo-rel-move-to">cairo_rel_move_to</link>               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx,
                                             <link linkend="double">double</link> dy);
<link linkend="void">void</link>        <link linkend="cairo-rel-line-to">cairo_rel_line_to</link>               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx,
                                             <link linkend="double">double</link> dy);
<link linkend="void">void</link>        <link linkend="cairo-rel-curve-to">cairo_rel_curve_to</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx1,
                                             <link linkend="double">double</link> dy1,
                                             <link linkend="double">double</link> dx2,
                                             <link linkend="double">double</link> dy2,
                                             <link linkend="double">double</link> dx3,
                                             <link linkend="double">double</link> dy3);
<link linkend="void">void</link>        <link linkend="cairo-rectangle">cairo_rectangle</link>                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y,
                                             <link linkend="double">double</link> width,
                                             <link linkend="double">double</link> height);
<link linkend="void">void</link>        <link linkend="cairo-close-path">cairo_close_path</link>                (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-paint">cairo_paint</link>                     (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-paint-with-alpha">cairo_paint_with_alpha</link>          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> alpha);
<link linkend="void">void</link>        <link linkend="cairo-mask">cairo_mask</link>                      (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-pattern-t">cairo_pattern_t</link> *pattern);
<link linkend="void">void</link>        <link linkend="cairo-mask-surface">cairo_mask_surface</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-surface-t">cairo_surface_t</link> *surface,
                                             <link linkend="double">double</link> surface_x,
                                             <link linkend="double">double</link> surface_y);
<link linkend="void">void</link>        <link linkend="cairo-stroke">cairo_stroke</link>                    (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-stroke-preserve">cairo_stroke_preserve</link>           (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-fill">cairo_fill</link>                      (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-fill-preserve">cairo_fill_preserve</link>             (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-copy-page">cairo_copy_page</link>                 (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-show-page">cairo_show_page</link>                 (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-bool-t">cairo_bool_t</link> <link linkend="cairo-in-stroke">cairo_in_stroke</link>                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);
<link linkend="cairo-bool-t">cairo_bool_t</link> <link linkend="cairo-in-fill">cairo_in_fill</link>                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);
typedef     <link linkend="cairo-bool-t">cairo_bool_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-stroke-extents">cairo_stroke_extents</link>            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x1,
                                             <link linkend="double">double</link> *y1,
                                             <link linkend="double">double</link> *x2,
                                             <link linkend="double">double</link> *y2);
<link linkend="void">void</link>        <link linkend="cairo-fill-extents">cairo_fill_extents</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x1,
                                             <link linkend="double">double</link> *y1,
                                             <link linkend="double">double</link> *x2,
                                             <link linkend="double">double</link> *y2);
<link linkend="void">void</link>        <link linkend="cairo-clip">cairo_clip</link>                      (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-clip-preserve">cairo_clip_preserve</link>             (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-reset-clip">cairo_reset_clip</link>                (<link linkend="cairo-t">cairo_t</link> *cr);
            <link linkend="cairo-glyph-t">cairo_glyph_t</link>;
enum        <link linkend="cairo-font-slant-t">cairo_font_slant_t</link>;
enum        <link linkend="cairo-font-weight-t">cairo_font_weight_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-select-font-face">cairo_select_font_face</link>          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *family,
                                             <link linkend="cairo-font-slant-t">cairo_font_slant_t</link> slant,
                                             <link linkend="cairo-font-weight-t">cairo_font_weight_t</link> weight);
<link linkend="void">void</link>        <link linkend="cairo-set-font-size">cairo_set_font_size</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> size);
<link linkend="void">void</link>        <link linkend="cairo-set-font-matrix">cairo_set_font_matrix</link>           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);
<link linkend="void">void</link>        <link linkend="cairo-get-font-matrix">cairo_get_font_matrix</link>           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);
<link linkend="void">void</link>        <link linkend="cairo-set-font-options">cairo_set_font_options</link>          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);
<link linkend="void">void</link>        <link linkend="cairo-get-font-options">cairo_get_font_options</link>          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);
<link linkend="void">void</link>        <link linkend="cairo-show-text">cairo_show_text</link>                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8);
<link linkend="void">void</link>        <link linkend="cairo-show-glyphs">cairo_show_glyphs</link>               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs);
<link linkend="cairo-font-face-t">cairo_font_face_t</link>* <link linkend="cairo-get-font-face">cairo_get_font_face</link>      (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-font-extents">cairo_font_extents</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-extents-t">cairo_font_extents_t</link> *extents);
<link linkend="void">void</link>        <link linkend="cairo-set-font-face">cairo_set_font_face</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-face-t">cairo_font_face_t</link> *font_face);
<link linkend="void">void</link>        <link linkend="cairo-text-extents">cairo_text_extents</link>              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8,
                                             <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);
<link linkend="void">void</link>        <link linkend="cairo-glyph-extents">cairo_glyph_extents</link>             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs,
                                             <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);
<link linkend="void">void</link>        <link linkend="cairo-text-path">cairo_text_path</link>                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8);
<link linkend="void">void</link>        <link linkend="cairo-glyph-path">cairo_glyph_path</link>                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs);
<link linkend="cairo-operator-t">cairo_operator_t</link> <link linkend="cairo-get-operator">cairo_get_operator</link>         (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-pattern-t">cairo_pattern_t</link>* <link linkend="cairo-get-source">cairo_get_source</link>           (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="double">double</link>      <link linkend="cairo-get-tolerance">cairo_get_tolerance</link>             (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-get-current-point">cairo_get_current_point</link>         (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);
<link linkend="cairo-fill-rule-t">cairo_fill_rule_t</link> <link linkend="cairo-get-fill-rule">cairo_get_fill_rule</link>       (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="double">double</link>      <link linkend="cairo-get-line-width">cairo_get_line_width</link>            (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-line-cap-t">cairo_line_cap_t</link> <link linkend="cairo-get-line-cap">cairo_get_line_cap</link>         (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-line-join-t">cairo_line_join_t</link> <link linkend="cairo-get-line-join">cairo_get_line_join</link>       (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="double">double</link>      <link linkend="cairo-get-miter-limit">cairo_get_miter_limit</link>           (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-get-matrix">cairo_get_matrix</link>                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);
<link linkend="cairo-surface-t">cairo_surface_t</link>* <link linkend="cairo-get-target">cairo_get_target</link>           (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-path-t">cairo_path_t</link>* <link linkend="cairo-copy-path">cairo_copy_path</link>               (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="cairo-path-t">cairo_path_t</link>* <link linkend="cairo-copy-path-flat">cairo_copy_path_flat</link>          (<link linkend="cairo-t">cairo_t</link> *cr);
<link linkend="void">void</link>        <link linkend="cairo-append-path">cairo_append_path</link>               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-path-t">cairo_path_t</link> *path);
enum        <link linkend="cairo-path-data-type-t">cairo_path_data_type_t</link>;
            <link linkend="cairo-path-t">cairo_path_t</link>;
<link linkend="void">void</link>        <link linkend="cairo-path-destroy">cairo_path_destroy</link>              (<link linkend="cairo-path-t">cairo_path_t</link> *path);
enum        <link linkend="cairo-status-t">cairo_status_t</link>;
<link linkend="cairo-status-t">cairo_status_t</link> <link linkend="cairo-status">cairo_status</link>                 (<link linkend="cairo-t">cairo_t</link> *cr);
#define     <link linkend="cairo-status-string">cairo_status_string</link>
const <link linkend="char">char</link>* <link linkend="cairo-status-to-string">cairo_status_to_string</link>          (<link linkend="cairo-status-t">cairo_status_t</link> status);
enum        <link linkend="cairo-filter-t">cairo_filter_t</link>;
<link linkend="cairo-surface-t">cairo_surface_t</link>* <link linkend="cairo-image-surface-create">cairo_image_surface_create</link> (<link linkend="cairo-format-t">cairo_format_t</link> format,
                                             <link linkend="int">int</link> width,
                                             <link linkend="int">int</link> height);
<link linkend="cairo-surface-t">cairo_surface_t</link>* <link linkend="cairo-image-surface-create-for-data">cairo_image_surface_create_for_data</link>
                                            (unsigned <link linkend="char">char</link> *data,
                                             <link linkend="cairo-format-t">cairo_format_t</link> format,
                                             <link linkend="int">int</link> width,
                                             <link linkend="int">int</link> height,
                                             <link linkend="int">int</link> stride);
<link linkend="int">int</link>         <link linkend="cairo-image-surface-get-width">cairo_image_surface_get_width</link>   (<link linkend="cairo-surface-t">cairo_surface_t</link> *surface);
<link linkend="int">int</link>         <link linkend="cairo-image-surface-get-height">cairo_image_surface_get_height</link>  (<link linkend="cairo-surface-t">cairo_surface_t</link> *surface);
<link linkend="void">void</link>        (<link linkend="cairo-destroy-func-t">*cairo_destroy_func_t</link>)         (<link linkend="void">void</link> *data);
            <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link>;
<link linkend="cairo-status-t">cairo_status_t</link> (<link linkend="cairo-read-func-t">*cairo_read_func_t</link>)         (<link linkend="void">void</link> *closure,
                                             unsigned <link linkend="char">char</link> *data,
                                             unsigned <link linkend="int">int</link> length);
<link linkend="cairo-status-t">cairo_status_t</link> (<link linkend="cairo-write-func-t">*cairo_write_func_t</link>)        (<link linkend="void">void</link> *closure,
                                             unsigned <link linkend="char">char</link> *data,
                                             unsigned <link linkend="int">int</link> length);

</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>

  <para>
    <link linkend="cairo-t"><type>cairo_t</type></link> is the main object used when drawing with Cairo. To
    draw with Cairo, you create a <link linkend="cairo-t"><type>cairo_t</type></link>, set the target surface,
    and drawing options for the <link linkend="cairo-t"><type>cairo_t</type></link>, create shapes with
    functions like <link linkend="cairo-move-to"><function>cairo_move_to()</function></link> and <link linkend="cairo-line-to"><function>cairo_line_to()</function></link>, and then
    draw ships with <link linkend="cairo-stroke"><function>cairo_stroke()</function></link> or <link linkend="cairo-fill"><function>cairo_fill()</function></link>.
  </para>
  <para>
    <link linkend="cairo-t"><type>cairo_t</type></link><!-- -->'s can be pushed to a stack via <link linkend="cairo-save"><function>cairo_save()</function></link>.
    They may then safely be changed, without loosing the current state.
    Use <link linkend="cairo-restore"><function>cairo_restore()</function></link> to restore to the saved state.
  </para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="cairo-t"/>cairo_t</title>
<indexterm><primary>cairo_t</primary></indexterm><programlisting>typedef struct _cairo cairo_t;
</programlisting>
<para>
A <link linkend="cairo-t"><type>cairo_t</type></link> contains the current state of the rendering device,
including coordinates of yet to be drawn shapes.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-create"/>cairo_create ()</title>
<indexterm><primary>cairo_create</primary></indexterm><programlisting><link linkend="cairo-t">cairo_t</link>*    cairo_create                    (<link linkend="cairo-surface-t">cairo_surface_t</link> *target);</programlisting>
<para>
Creates a new <link linkend="cairo-t"><type>cairo_t</type></link> with all graphics state parameters set to
default values and with <parameter>target</parameter> as a target surface. The target
surface should be constructed with a backend-specific function such
as cairo_image_surface_create (or any other
cairo_&lt;backend&gt;_surface_create variant).
</para>
<para>
This function references <parameter>target</parameter>, so you can immediately
call <link linkend="cairo-surface-destroy"><function>cairo_surface_destroy()</function></link> on it if you don't need to
maintain a separate reference to it.
</para>
<para>
Note that there are restrictions on using the same surface in
multiple contexts at the same time. If, after creating <parameter>cr_a</parameter> with
<parameter>surface</parameter> you also create <parameter>cr_b</parameter> with the same surface, you must
ensure that <parameter>cr_b</parameter> has finished using <parameter>surface</parameter> before resuming use
of <parameter>cr_a</parameter>. Currently, the only way time at which this is guaranteed
is when the the last reference to <parameter>cr_b</parameter> is released with
<link linkend="cairo-destroy"><function>cairo_destroy()</function></link>. (XXX: We need to add a <link linkend="cairo-finish"><function>cairo_finish()</function></link> call to
provide a way to achieve this explicitly). See also the
<literal>CAIRO_STATUS_BAD_NESTING</literal> status.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>target</parameter>&nbsp;:</term>
<listitem><simpara> target surface for the context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="cairo-t"><type>cairo_t</type></link> with a reference
 count of 1. The initial reference count should be released
 with <link linkend="cairo-destroy"><function>cairo_destroy()</function></link> when you are done using the <link linkend="cairo-t"><type>cairo_t</type></link>.
 This function never returns <literal>NULL</literal>. If memory cannot be
 allocated, a special <link linkend="cairo-t"><type>cairo_t</type></link> object will be returned on
 which <link linkend="cairo-status"><function>cairo_status()</function></link> returns <literal>CAIRO_STATUS_NO_MEMORY</literal>.
 You can use this object normally, but no drawing will
 be done.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-reference"/>cairo_reference ()</title>
<indexterm><primary>cairo_reference</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_reference                 (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Increases the reference count on <parameter>cr</parameter> by one. This prevents
<parameter>cr</parameter> from being destroyed until a matching call to <link linkend="cairo-destroy"><function>cairo_destroy()</function></link> 
is made.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-destroy"/>cairo_destroy ()</title>
<indexterm><primary>cairo_destroy</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_destroy                   (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Decreases the reference count on <parameter>cr</parameter> by one. If the result
is zero, then <parameter>cr</parameter> and all associated resources are freed.
See <link linkend="cairo-reference"><function>cairo_reference()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-save"/>cairo_save ()</title>
<indexterm><primary>cairo_save</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_save                      (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Makes a copy of the current state of <parameter>cr</parameter> and saves it
on an internal stack of saved states for <parameter>cr</parameter>. When
<link linkend="cairo-restore"><function>cairo_restore()</function></link> is called, <parameter>cr</parameter> will be restored to
the saved state. Multiple calls to <link linkend="cairo-save"><function>cairo_save()</function></link> and
<link linkend="cairo-restore"><function>cairo_restore()</function></link> can be nested; each call to <link linkend="cairo-restore"><function>cairo_restore()</function></link>
restores the state from the matching paired <link linkend="cairo-save"><function>cairo_save()</function></link>.
</para>
<para>
It isn't necessary to clear all saved states before
a <link linkend="cairo-t"><type>cairo_t</type></link> is freed. If the reference count of a <link linkend="cairo-t"><type>cairo_t</type></link>
drops to zero in response to a call to <link linkend="cairo-destroy"><function>cairo_destroy()</function></link>,
any saved states will be freed along with the <link linkend="cairo-t"><type>cairo_t</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-restore"/>cairo_restore ()</title>
<indexterm><primary>cairo_restore</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_restore                   (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Restores <parameter>cr</parameter> to the state saved by a preceding call to
<link linkend="cairo-save"><function>cairo_save()</function></link> and removes that state from the stack of
saved states.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-content-t"/>enum cairo_content_t</title>
<indexterm><primary>cairo_content_t</primary></indexterm><programlisting>typedef enum _cairo_content {
    CAIRO_CONTENT_COLOR		= 0x1000,
    CAIRO_CONTENT_ALPHA		= 0x2000,
    CAIRO_CONTENT_COLOR_ALPHA	= 0x3000
} cairo_content_t;
</programlisting>
<para>
<parameter>cairo_content_t</parameter> is used to describe the content that a surface will
contain, whether color information, alpha information (translucence
vs. opacity), or both.
</para>
<para>
Note: The large values here are designed to keep cairo_content_t
values distinct from cairo_format_t values so that the
implementation can detect the error if users confuse the two types.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>CAIRO_CONTENT_COLOR</literal></term>
<listitem><simpara> The surface will hold color content only.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_CONTENT_ALPHA</literal></term>
<listitem><simpara> The surface will hold alpha content only.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_CONTENT_COLOR_ALPHA</literal></term>
<listitem><simpara> The surface will hold color and alpha content.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="CAIRO-CONTENT-VALID:CAPS"/>CAIRO_CONTENT_VALID()</title>
<indexterm><primary>CAIRO_CONTENT_VALID</primary></indexterm><programlisting>#define     CAIRO_CONTENT_VALID(content)</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>content</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-format-t"/>enum cairo_format_t</title>
<indexterm><primary>cairo_format_t</primary></indexterm><programlisting>typedef enum _cairo_format {
    CAIRO_FORMAT_ARGB32,
    CAIRO_FORMAT_RGB24,
    CAIRO_FORMAT_A8,
    CAIRO_FORMAT_A1
} cairo_format_t;
</programlisting>
<para>
<link linkend="cairo-format-t"><type>cairo_format_t</type></link> is used to identify the memory format of
image data.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>CAIRO_FORMAT_ARGB32</literal></term>
<listitem><simpara> each pixel is a 32-bit quantity, with
  alpha in the upper 8 bits, then red, then green, then blue.
  The 32-bit quantities are stored native-endian. Pre-multiplied
  alpha is used. (That is, 50% transparent red is 0x80800000,
  not 0x80ff0000.)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_FORMAT_RGB24</literal></term>
<listitem><simpara> each pixel is a 32-bit quantity, with
  the upper 8 bits unused. Red, Green, and Blue are stored
  in the remaining 24 bits in that order.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_FORMAT_A8</literal></term>
<listitem><simpara> each pixel is a 8-bit quantity holding
  an alpha value.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_FORMAT_A1</literal></term>
<listitem><simpara> each pixel is a 1-bit quantity holding
  an alpha value. Pixels are packed together into 32-bit
  quantities. The ordering of the bits matches the
  endianess of the platform. On a big-endian machine, the
  first pixel is in the uppermost bit, on a little-endian
  machine the first pixel is in the least-significant bit.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="CAIRO-FORMAT-VALID:CAPS"/>CAIRO_FORMAT_VALID()</title>
<indexterm><primary>CAIRO_FORMAT_VALID</primary></indexterm><programlisting>#define     CAIRO_FORMAT_VALID(format)</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-operator-t"/>enum cairo_operator_t</title>
<indexterm><primary>cairo_operator_t</primary></indexterm><programlisting>typedef enum _cairo_operator {
    CAIRO_OPERATOR_CLEAR,

    CAIRO_OPERATOR_SOURCE,
    CAIRO_OPERATOR_OVER,
    CAIRO_OPERATOR_IN,
    CAIRO_OPERATOR_OUT,
    CAIRO_OPERATOR_ATOP,

    CAIRO_OPERATOR_DEST,
    CAIRO_OPERATOR_DEST_OVER,
    CAIRO_OPERATOR_DEST_IN,
    CAIRO_OPERATOR_DEST_OUT,
    CAIRO_OPERATOR_DEST_ATOP,

    CAIRO_OPERATOR_XOR,
    CAIRO_OPERATOR_ADD,
    CAIRO_OPERATOR_SATURATE
} cairo_operator_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-set-operator"/>cairo_set_operator ()</title>
<indexterm><primary>cairo_set_operator</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_operator              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-operator-t">cairo_operator_t</link> op);</programlisting>
<para>
Sets the compositing operator to be used for all drawing
operations. See <link linkend="cairo-operator-t"><type>cairo_operator_t</type></link> for details on the semantics of
each available drawing operator.
</para>
<para>
XXX: I'd also like to direct the reader's attention to some
(not-yet-written) section on cairo's imaging model. How would I do
that if such a section existed? (cworth).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> a compositing operator, specified as a <link linkend="cairo-operator-t"><type>cairo_operator_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-source-rgb"/>cairo_set_source_rgb ()</title>
<indexterm><primary>cairo_set_source_rgb</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_source_rgb            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> red,
                                             <link linkend="double">double</link> green,
                                             <link linkend="double">double</link> blue);</programlisting>
<para>
Sets the source pattern within <parameter>cr</parameter> to an opaque color. This opaque
color will then be used for any subsequent drawing operation until
a new source pattern is set.
</para>
<para>
The color components are floating point numbers in the range 0 to
1. If the values passed in are outside that range, they will be
clamped.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> red component of color
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> green component of color
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> blue component of color
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-source-rgba"/>cairo_set_source_rgba ()</title>
<indexterm><primary>cairo_set_source_rgba</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_source_rgba           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> red,
                                             <link linkend="double">double</link> green,
                                             <link linkend="double">double</link> blue,
                                             <link linkend="double">double</link> alpha);</programlisting>
<para>
Sets the source pattern within <parameter>cr</parameter> to a translucent color. This
color will then be used for any subsequent drawing operation until
a new source pattern is set.
</para>
<para>
The color and alpha components are floating point numbers in the
range 0 to 1. If the values passed in are outside that range, they
will be clamped.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> red component of color
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> green component of color
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> blue component of color
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha</parameter>&nbsp;:</term>
<listitem><simpara> alpha component of color
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-source"/>cairo_set_source ()</title>
<indexterm><primary>cairo_set_source</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_source                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-pattern-t">cairo_pattern_t</link> *source);</programlisting>
<para>
Sets the source pattern within <parameter>cr</parameter> to <parameter>source</parameter>. This pattern
will then be used for any subsequent drawing operation until a new
source pattern is set.
</para>
<para>
XXX: I'd also like to direct the reader's attention to some
(not-yet-written) section on cairo's imaging model. How would I do
that if such a section existed? (cworth).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>source</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-pattern-t"><type>cairo_pattern_t</type></link> to be used as the source for
subsequent drawing operations.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-source-surface"/>cairo_set_source_surface ()</title>
<indexterm><primary>cairo_set_source_surface</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_source_surface        (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-surface-t">cairo_surface_t</link> *surface,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);</programlisting>
<para>
This is a convenience function for creating a pattern from <parameter>surface</parameter>
and setting it as the source in <parameter>cr</parameter> with <link linkend="cairo-set-source"><function>cairo_set_source()</function></link>.
</para>
<para>
The <parameter>x</parameter> and <parameter>y</parameter> parameters give the user-space coordinate at which
the surface origin should appear. (The surface origin is its
upper-left corner before any transformation has been applied.) The
<parameter>x</parameter> and <parameter>y</parameter> patterns are negated and then set as translation values
in the pattern matrix.
</para>
<para>
Other than the initial translation pattern matrix, as described
above, all other pattern attributes, (such as its extend mode), are
set to the default values as in cairo_pattern_create_for_surface.
The resulting pattern can be queried with <link linkend="cairo-get-source"><function>cairo_get_source()</function></link> so
that these attributes can be modified if desired, (eg. to create a
repeating pattern with <link linkend="cairo-pattern-set-extend"><function>cairo_pattern_set_extend()</function></link>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>surface</parameter>&nbsp;:</term>
<listitem><simpara> a surface to be used to set the source pattern
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> User-space X coordinate for surface origin
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> User-space Y coordinate for surface origin
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-tolerance"/>cairo_set_tolerance ()</title>
<indexterm><primary>cairo_set_tolerance</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_tolerance             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> tolerance);</programlisting>
<para>
Sets the tolerance used when converting paths into trapezoids.
Curved segments of the path will be subdivided until the maximum
deviation between the original path and the polygonal approximation
is less than <parameter>tolerance</parameter>. The default value is 0.1. A larger
value will give better performance, a smaller value, better
appearance. (Reducing the value from the default value of 0.1
is unlikely to improve appearance significantly.)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tolerance</parameter>&nbsp;:</term>
<listitem><simpara> the tolerance, in device units (typically pixels)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-fill-rule-t"/>enum cairo_fill_rule_t</title>
<indexterm><primary>cairo_fill_rule_t</primary></indexterm><programlisting>typedef enum _cairo_fill_rule {
    CAIRO_FILL_RULE_WINDING,
    CAIRO_FILL_RULE_EVEN_ODD
} cairo_fill_rule_t;
</programlisting>
<para>
<link linkend="cairo-fill-rule-t"><type>cairo_fill_rule_t</type></link> is used to select how paths are filled. For both
fill rules, whether or not a point is included in the fill is
determined by taking a ray from that point to infinity and looking
at intersections with the path. The ray can be in any direction,
as long as it doesn't pass through the end point of a segment
or have a tricky intersection such as intersecting tangent to the path.
(Note that filling is not actually implemented in this way. This
is just a description of the rule that is applied.)</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>CAIRO_FILL_RULE_WINDING</literal></term>
<listitem><simpara> If the path crosses the ray from
left-to-right, counts +1. If the path crosses the ray
from right to left, counts -1. (Left and right are determined
from the perspective of looking along the ray from the starting
point.) If the total count is non-zero, the point will be filled.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_FILL_RULE_EVEN_ODD</literal></term>
<listitem><simpara> Counts the total number of
intersections, without regard to the orientation of the contour. If
the total number of intersections is odd, the point will be
filled.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-fill-rule"/>cairo_set_fill_rule ()</title>
<indexterm><primary>cairo_set_fill_rule</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_fill_rule             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-fill-rule-t">cairo_fill_rule_t</link> fill_rule);</programlisting>
<para>
Set the current fill rule within the cairo context. The fill rule
is used to determine which regions are inside or outside a complex
(potentially self-intersecting) path. The current fill rule affects
both cairo_fill and cairo_clip. See <link linkend="cairo-fill-rule-t"><type>cairo_fill_rule_t</type></link> for details
on the semantics of each available fill rule.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fill_rule</parameter>&nbsp;:</term>
<listitem><simpara> a fill rule, specified as a <link linkend="cairo-fill-rule-t"><type>cairo_fill_rule_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-line-width"/>cairo_set_line_width ()</title>
<indexterm><primary>cairo_set_line_width</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_line_width            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> width);</programlisting>
<para>
Sets the current line width within the cairo context. The line
width specifies the diameter of a pen that is circular in
user-space.
</para>
<para>
As with the other stroke parameters, the current line cap style is
examined by <link linkend="cairo-stroke"><function>cairo_stroke()</function></link>, <link linkend="cairo-stroke-extents"><function>cairo_stroke_extents()</function></link>, and
<link linkend="cairo-stroke-to-path"><function>cairo_stroke_to_path()</function></link>, but does not have any effect during path
construction.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> a line width, as a user-space value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-line-cap-t"/>enum cairo_line_cap_t</title>
<indexterm><primary>cairo_line_cap_t</primary></indexterm><programlisting>typedef enum _cairo_line_cap {
    CAIRO_LINE_CAP_BUTT,
    CAIRO_LINE_CAP_ROUND,
    CAIRO_LINE_CAP_SQUARE
} cairo_line_cap_t;
</programlisting>
<para>
enumeration for style of line-endings</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>CAIRO_LINE_CAP_BUTT</literal></term>
<listitem><simpara> start(stop) the line exactly at the start(end) point
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_LINE_CAP_ROUND</literal></term>
<listitem><simpara> use a round ending, the center of the circle is the end point
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_LINE_CAP_SQUARE</literal></term>
<listitem><simpara> use squared ending, the center of the square is the end point
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-line-cap"/>cairo_set_line_cap ()</title>
<indexterm><primary>cairo_set_line_cap</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_line_cap              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-line-cap-t">cairo_line_cap_t</link> line_cap);</programlisting>
<para>
Sets the current line cap style within the cairo context. See
<link linkend="cairo-line-cap-t"><type>cairo_line_cap_t</type></link> for details about how the available line cap
styles are drawn.
</para>
<para>
As with the other stroke parameters, the current line cap style is
examined by <link linkend="cairo-stroke"><function>cairo_stroke()</function></link>, <link linkend="cairo-stroke-extents"><function>cairo_stroke_extents()</function></link>, and
<link linkend="cairo-stroke-to-path"><function>cairo_stroke_to_path()</function></link>, but does not have any effect during path
construction.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context, as a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line_cap</parameter>&nbsp;:</term>
<listitem><simpara> a line cap style, as a <link linkend="cairo-line-cap-t"><type>cairo_line_cap_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-line-join-t"/>enum cairo_line_join_t</title>
<indexterm><primary>cairo_line_join_t</primary></indexterm><programlisting>typedef enum _cairo_line_join {
    CAIRO_LINE_JOIN_MITER,
    CAIRO_LINE_JOIN_ROUND,
    CAIRO_LINE_JOIN_BEVEL
} cairo_line_join_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-set-line-join"/>cairo_set_line_join ()</title>
<indexterm><primary>cairo_set_line_join</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_line_join             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-line-join-t">cairo_line_join_t</link> line_join);</programlisting>
<para>
Sets the current line join style within the cairo context. See
<link linkend="cairo-line-join-t"><type>cairo_line_join_t</type></link> for details about how the available line join
styles are drawn.
</para>
<para>
As with the other stroke parameters, the current line join style is
examined by <link linkend="cairo-stroke"><function>cairo_stroke()</function></link>, <link linkend="cairo-stroke-extents"><function>cairo_stroke_extents()</function></link>, and
<link linkend="cairo-stroke-to-path"><function>cairo_stroke_to_path()</function></link>, but does not have any effect during path
construction.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context, as a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line_join</parameter>&nbsp;:</term>
<listitem><simpara> a line joint style, as a <link linkend="cairo-line-join-t"><type>cairo_line_join_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-dash"/>cairo_set_dash ()</title>
<indexterm><primary>cairo_set_dash</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_dash                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dashes,
                                             <link linkend="int">int</link> ndash,
                                             <link linkend="double">double</link> offset);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dashes</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ndash</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-miter-limit"/>cairo_set_miter_limit ()</title>
<indexterm><primary>cairo_set_miter_limit</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_miter_limit           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> limit);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>limit</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-translate"/>cairo_translate ()</title>
<indexterm><primary>cairo_translate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_translate                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> tx,
                                             <link linkend="double">double</link> ty);</programlisting>
<para>
Modifies the current transformation matrix (CTM) by translating the
user-space origin by (<parameter>tx</parameter>, <parameter>ty</parameter>). This offset is interpreted as a
user-space coordinate according to the CTM in place before the new
call to cairo_translate. In other words, the translation of the
user-space origin takes place after any existing transformation.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tx</parameter>&nbsp;:</term>
<listitem><simpara> amount to translate in the X direction
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ty</parameter>&nbsp;:</term>
<listitem><simpara> amount to translate in the Y direction
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scale"/>cairo_scale ()</title>
<indexterm><primary>cairo_scale</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_scale                     (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> sx,
                                             <link linkend="double">double</link> sy);</programlisting>
<para>
Modifies the current transformation matrix (CTM) by scaling the X
and Y user-space axes by <parameter>sx</parameter> and <parameter>sy</parameter> respectively. The scaling of
the axes takes place after any existing transformation of user
space.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sx</parameter>&nbsp;:</term>
<listitem><simpara> scale factor for the X dimension
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sy</parameter>&nbsp;:</term>
<listitem><simpara> scale factor for the Y dimension
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-rotate"/>cairo_rotate ()</title>
<indexterm><primary>cairo_rotate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_rotate                    (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> angle);</programlisting>
<para>
Modifies the current transformation matrix (CTM) by rotating the
user-space axes by <parameter>angle</parameter> radians. The rotation of the axes takes
places after any existing transformation of user space. The
rotation direction for positive angles is from the positive X axis
toward the positive Y axis.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle</parameter>&nbsp;:</term>
<listitem><simpara> angle (in radians) by which the user-space axes will be
rotated
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-transform"/>cairo_transform ()</title>
<indexterm><primary>cairo_transform</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_transform                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting>
<para>
Modifies the current transformation matrix (CTM) by applying
<parameter>matrix</parameter> as an additional transformation. The new transformation of
user space takes place after any existing transformation.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&nbsp;:</term>
<listitem><simpara> a transformation to be applied to the user-space axes
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-matrix"/>cairo_set_matrix ()</title>
<indexterm><primary>cairo_set_matrix</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_matrix                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting>
<para>
Modifies the current transformation matrix (CTM) by setting it
equal to <parameter>matrix</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&nbsp;:</term>
<listitem><simpara> a transformation matrix from user space to device space
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-identity-matrix"/>cairo_identity_matrix ()</title>
<indexterm><primary>cairo_identity_matrix</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_identity_matrix           (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Resets the current transformation matrix (CTM) by setting it equal
to the identity matrix. That is, the user-space and device-space
axes will be aligned and one user-space unit will transform to one
device-space unit.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-user-to-device"/>cairo_user_to_device ()</title>
<indexterm><primary>cairo_user_to_device</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_user_to_device            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);</programlisting>
<para>
Transform a coordinate from user space to device space by
multiplying the given point by the current transformation matrix
(CTM).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> X value of coordinate (in/out parameter)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> Y value of coordinate (in/out parameter)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-user-to-device-distance"/>cairo_user_to_device_distance ()</title>
<indexterm><primary>cairo_user_to_device_distance</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_user_to_device_distance   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dx,
                                             <link linkend="double">double</link> *dy);</programlisting>
<para>
Transform a distance vector from user space to device space. This
function is similar to <link linkend="cairo-user-to-device"><function>cairo_user_to_device()</function></link> except that the
translation components of the CTM will be ignored when transforming
(<parameter>dx</parameter>,<parameter>dy</parameter>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx</parameter>&nbsp;:</term>
<listitem><simpara> X component of a distance vector (in/out parameter)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy</parameter>&nbsp;:</term>
<listitem><simpara> Y component of a distance vector (in/out parameter)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-device-to-user"/>cairo_device_to_user ()</title>
<indexterm><primary>cairo_device_to_user</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_device_to_user            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);</programlisting>
<para>
Transform a coordinate from device space to user space by
multiplying the given point by the inverse of the current
transformation matrix (CTM).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> X value of coordinate (in/out parameter)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> Y value of coordinate (in/out parameter)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-device-to-user-distance"/>cairo_device_to_user_distance ()</title>
<indexterm><primary>cairo_device_to_user_distance</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_device_to_user_distance   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *dx,
                                             <link linkend="double">double</link> *dy);</programlisting>
<para>
Transform a distance vector from device space to user space. This
function is similar to <link linkend="cairo-device-to-user"><function>cairo_device_to_user()</function></link> except that the
translation components of the inverse CTM will be ignored when
transforming (<parameter>dx</parameter>,<parameter>dy</parameter>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx</parameter>&nbsp;:</term>
<listitem><simpara> X component of a distance vector (in/out parameter)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy</parameter>&nbsp;:</term>
<listitem><simpara> Y component of a distance vector (in/out parameter)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-new-path"/>cairo_new_path ()</title>
<indexterm><primary>cairo_new_path</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_new_path                  (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-move-to"/>cairo_move_to ()</title>
<indexterm><primary>cairo_move_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_move_to                   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-line-to"/>cairo_line_to ()</title>
<indexterm><primary>cairo_line_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_line_to                   (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-curve-to"/>cairo_curve_to ()</title>
<indexterm><primary>cairo_curve_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_curve_to                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x1,
                                             <link linkend="double">double</link> y1,
                                             <link linkend="double">double</link> x2,
                                             <link linkend="double">double</link> y2,
                                             <link linkend="double">double</link> x3,
                                             <link linkend="double">double</link> y3);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x3</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y3</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-arc"/>cairo_arc ()</title>
<indexterm><primary>cairo_arc</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_arc                       (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> xc,
                                             <link linkend="double">double</link> yc,
                                             <link linkend="double">double</link> radius,
                                             <link linkend="double">double</link> angle1,
                                             <link linkend="double">double</link> angle2);</programlisting>
<para>
Adds an arc from <parameter>angle1</parameter> to <parameter>angle2</parameter> to the current path. If there
is a current point, that point is connected to the start of the arc
by a straight line segment. Angles are measured in radians with an
angle of 0 along the X axis and an angle of <literal>M_PI</literal> radians (90
degrees) along the Y axis, so with the default transformation
matrix, positive angles are clockwise. (To convert from degrees to
radians, use <literal>degrees * (M_PI / 180.)</literal>.)  This
function gives the arc in the direction of increasing angle; see
<link linkend="cairo-arc-negative"><function>cairo_arc_negative()</function></link> to get the arc in the direction of decreasing
angle.
</para>
<para>
A full arc is drawn as a circle. To make an oval arc, you can scale
the current transformation matrix by different amounts in the X and
Y directions. For example, to draw a full oval in the box given
by <parameter>x</parameter>, <parameter>y</parameter>, <parameter>width</parameter>, <parameter>height</parameter>:
 
<informalexample><programlisting>
cairo_save (cr);
cairo_translate (x + width / 2., y + height / 2.);
cairo_scale (1. / (height / 2.), 1. / (width / 2.));
cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI);
cairo_restore (cr);
</programlisting></informalexample></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xc</parameter>&nbsp;:</term>
<listitem><simpara> X position of the center of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>yc</parameter>&nbsp;:</term>
<listitem><simpara> Y position of the center of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter>&nbsp;:</term>
<listitem><simpara> the radius of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle1</parameter>&nbsp;:</term>
<listitem><simpara> the start angle, in radians
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle2</parameter>&nbsp;:</term>
<listitem><simpara> the end angle, in radians
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-arc-negative"/>cairo_arc_negative ()</title>
<indexterm><primary>cairo_arc_negative</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_arc_negative              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> xc,
                                             <link linkend="double">double</link> yc,
                                             <link linkend="double">double</link> radius,
                                             <link linkend="double">double</link> angle1,
                                             <link linkend="double">double</link> angle2);</programlisting>
<para>
Adds an arc from <parameter>angle1</parameter> to <parameter>angle2</parameter> to the current path. The
function behaves identically to <link linkend="cairo-arc"><function>cairo_arc()</function></link> except that instead of
giving the arc in the direction of increasing angle, it gives
the arc in the direction of decreasing angle.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xc</parameter>&nbsp;:</term>
<listitem><simpara> X position of the center of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>yc</parameter>&nbsp;:</term>
<listitem><simpara> Y position of the center of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter>&nbsp;:</term>
<listitem><simpara> the radius of the arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle1</parameter>&nbsp;:</term>
<listitem><simpara> the start angle, in radians
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle2</parameter>&nbsp;:</term>
<listitem><simpara> the end angle, in radians
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-rel-move-to"/>cairo_rel_move_to ()</title>
<indexterm><primary>cairo_rel_move_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_rel_move_to               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx,
                                             <link linkend="double">double</link> dy);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-rel-line-to"/>cairo_rel_line_to ()</title>
<indexterm><primary>cairo_rel_line_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_rel_line_to               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx,
                                             <link linkend="double">double</link> dy);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-rel-curve-to"/>cairo_rel_curve_to ()</title>
<indexterm><primary>cairo_rel_curve_to</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_rel_curve_to              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> dx1,
                                             <link linkend="double">double</link> dy1,
                                             <link linkend="double">double</link> dx2,
                                             <link linkend="double">double</link> dy2,
                                             <link linkend="double">double</link> dx3,
                                             <link linkend="double">double</link> dy3);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dx3</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dy3</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-rectangle"/>cairo_rectangle ()</title>
<indexterm><primary>cairo_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_rectangle                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y,
                                             <link linkend="double">double</link> width,
                                             <link linkend="double">double</link> height);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-close-path"/>cairo_close_path ()</title>
<indexterm><primary>cairo_close_path</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_close_path                (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-paint"/>cairo_paint ()</title>
<indexterm><primary>cairo_paint</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_paint                     (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
A drawing operator that paints the current source everywhere within
the current clip region.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-paint-with-alpha"/>cairo_paint_with_alpha ()</title>
<indexterm><primary>cairo_paint_with_alpha</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_paint_with_alpha          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> alpha);</programlisting>
<para>
A drawing operator that paints the current source everywhere within
the current clip region using a mask of constant alpha value
<parameter>alpha</parameter>. The effect is similar to <link linkend="cairo-paint"><function>cairo_paint()</function></link>, but the drawing
is faded out using the alpha value.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha</parameter>&nbsp;:</term>
<listitem><simpara> alpha value, between 0 (transparent) and 1 (opaque)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-mask"/>cairo_mask ()</title>
<indexterm><primary>cairo_mask</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_mask                      (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-pattern-t">cairo_pattern_t</link> *pattern);</programlisting>
<para>
A drawing operator that paints the current source
using the alpha channel of <parameter>pattern</parameter> as a mask. (Opaque
areas of <parameter>mask</parameter> are painted with the source, transparent
areas are not painted.)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-pattern-t"><type>cairo_pattern_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-mask-surface"/>cairo_mask_surface ()</title>
<indexterm><primary>cairo_mask_surface</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_mask_surface              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-surface-t">cairo_surface_t</link> *surface,
                                             <link linkend="double">double</link> surface_x,
                                             <link linkend="double">double</link> surface_y);</programlisting>
<para>
A drawing operator that paints the current source
using the alpha channel of <parameter>surface</parameter> as a mask. (Opaque
areas of <parameter>surface</parameter> are painted with the source, transparent
areas are not painted.)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>surface</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-surface-t"><type>cairo_surface_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>surface_x</parameter>&nbsp;:</term>
<listitem><simpara> X coordinate at which to place the origin of <parameter>surface</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>surface_y</parameter>&nbsp;:</term>
<listitem><simpara> Y coordinate at which to place the origin of <parameter>surface</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-stroke"/>cairo_stroke ()</title>
<indexterm><primary>cairo_stroke</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_stroke                    (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
A drawing operator that strokes the current path according to the
current line width, line join, line cap, and dash settings. After
cairo_stroke, the current path will be cleared from the cairo
context. See <link linkend="cairo-set-line-width"><function>cairo_set_line_width()</function></link>, <link linkend="cairo-set-line-join"><function>cairo_set_line_join()</function></link>,
<link linkend="cairo-set-line-cap"><function>cairo_set_line_cap()</function></link>, <link linkend="cairo-set-dash"><function>cairo_set_dash()</function></link>, and
<link linkend="cairo-stroke-preserve"><function>cairo_stroke_preserve()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-stroke-preserve"/>cairo_stroke_preserve ()</title>
<indexterm><primary>cairo_stroke_preserve</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_stroke_preserve           (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
A drawing operator that strokes the current path according to the
current line width, line join, line cap, and dash settings. Unlike
<link linkend="cairo-stroke"><function>cairo_stroke()</function></link>, cairo_stroke_preserve preserves the path within the
cairo context.
</para>
<para>
See <link linkend="cairo-set-line-width"><function>cairo_set_line_width()</function></link>, <link linkend="cairo-set-line-join"><function>cairo_set_line_join()</function></link>,
<link linkend="cairo-set-line-cap"><function>cairo_set_line_cap()</function></link>, <link linkend="cairo-set-dash"><function>cairo_set_dash()</function></link>, and
<link linkend="cairo-stroke-preserve"><function>cairo_stroke_preserve()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-fill"/>cairo_fill ()</title>
<indexterm><primary>cairo_fill</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_fill                      (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
A drawing operator that fills the current path according to the
current fill rule. After cairo_fill, the current path will be
cleared from the cairo context. See <link linkend="cairo-set-fill-rule"><function>cairo_set_fill_rule()</function></link> and
<link linkend="cairo-fill-preserve"><function>cairo_fill_preserve()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-fill-preserve"/>cairo_fill_preserve ()</title>
<indexterm><primary>cairo_fill_preserve</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_fill_preserve             (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
A drawing operator that fills the current path according to the
current fill rule. Unlike <link linkend="cairo-fill"><function>cairo_fill()</function></link>, cairo_fill_preserve
preserves the path within the cairo context.
</para>
<para>
See <link linkend="cairo-set-fill-rule"><function>cairo_set_fill_rule()</function></link> and <link linkend="cairo-fill"><function>cairo_fill()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-copy-page"/>cairo_copy_page ()</title>
<indexterm><primary>cairo_copy_page</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_copy_page                 (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-show-page"/>cairo_show_page ()</title>
<indexterm><primary>cairo_show_page</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_show_page                 (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-in-stroke"/>cairo_in_stroke ()</title>
<indexterm><primary>cairo_in_stroke</primary></indexterm><programlisting><link linkend="cairo-bool-t">cairo_bool_t</link> cairo_in_stroke                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-in-fill"/>cairo_in_fill ()</title>
<indexterm><primary>cairo_in_fill</primary></indexterm><programlisting><link linkend="cairo-bool-t">cairo_bool_t</link> cairo_in_fill                  (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> x,
                                             <link linkend="double">double</link> y);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-bool-t"/>cairo_bool_t</title>
<indexterm><primary>cairo_bool_t</primary></indexterm><programlisting>typedef int cairo_bool_t;
</programlisting>
<para>
<link linkend="cairo-bool-t"><type>cairo_bool_t</type></link> is used for boolean values. Returns of type
<link linkend="cairo-bool-t"><type>cairo_bool_t</type></link> will always be either 0 or 1, but testing against
these values explicitly is not encouraged; just use the
value as a boolean condition.
</para>
<para>
<informalexample><programlisting>
 if (cairo_in_stroke (cr, x, y)) {
     /<!-- -->* do something *<!-- -->/
 }
</programlisting></informalexample></para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-stroke-extents"/>cairo_stroke_extents ()</title>
<indexterm><primary>cairo_stroke_extents</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_stroke_extents            (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x1,
                                             <link linkend="double">double</link> *y1,
                                             <link linkend="double">double</link> *x2,
                                             <link linkend="double">double</link> *y2);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-fill-extents"/>cairo_fill_extents ()</title>
<indexterm><primary>cairo_fill_extents</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_fill_extents              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x1,
                                             <link linkend="double">double</link> *y1,
                                             <link linkend="double">double</link> *x2,
                                             <link linkend="double">double</link> *y2);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-clip"/>cairo_clip ()</title>
<indexterm><primary>cairo_clip</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_clip                      (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Establishes a new clip region by intersecting the current clip
region with the current path as it would be filled by <link linkend="cairo-fill"><function>cairo_fill()</function></link>
and according to the current fill rule (see <link linkend="cairo-set-fill-rule"><function>cairo_set_fill_rule()</function></link>).
</para>
<para>
After cairo_clip, the current path will be cleared from the cairo
context.
</para>
<para>
The current clip region affects all drawing operations by
effectively masking out any changes to the surface that are outside
the current clip region.
</para>
<para>
Calling <link linkend="cairo-clip"><function>cairo_clip()</function></link> can only make the clip region smaller, never
larger. But the current clip is part of the graphics state, so a
temporary restriction of the clip region can be achieved by
calling <link linkend="cairo-clip"><function>cairo_clip()</function></link> within a <link linkend="cairo-save"><function>cairo_save()</function></link>/<link linkend="cairo-restore"><function>cairo_restore()</function></link>
pair. The only other means of increasing the size of the clip
region is <link linkend="cairo-reset-clip"><function>cairo_reset_clip()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-clip-preserve"/>cairo_clip_preserve ()</title>
<indexterm><primary>cairo_clip_preserve</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_clip_preserve             (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Establishes a new clip region by intersecting the current clip
region with the current path as it would be filled by <link linkend="cairo-fill"><function>cairo_fill()</function></link>
and according to the current fill rule (see <link linkend="cairo-set-fill-rule"><function>cairo_set_fill_rule()</function></link>).
</para>
<para>
Unlike <link linkend="cairo-clip"><function>cairo_clip()</function></link>, cairo_clip_preserve preserves the path within
the cairo context.
</para>
<para>
The current clip region affects all drawing operations by
effectively masking out any changes to the surface that are outside
the current clip region.
</para>
<para>
Calling <link linkend="cairo-clip"><function>cairo_clip()</function></link> can only make the clip region smaller, never
larger. But the current clip is part of the graphics state, so a
temporary restriction of the clip region can be achieved by
calling <link linkend="cairo-clip"><function>cairo_clip()</function></link> within a <link linkend="cairo-save"><function>cairo_save()</function></link>/<link linkend="cairo-restore"><function>cairo_restore()</function></link>
pair. The only other means of increasing the size of the clip
region is <link linkend="cairo-reset-clip"><function>cairo_reset_clip()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-reset-clip"/>cairo_reset_clip ()</title>
<indexterm><primary>cairo_reset_clip</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_reset_clip                (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Reset the current clip region to its original, unrestricted
state. That is, set the clip region to an infinitely large shape
containing the target surface. Equivalently, if infinity is too
hard to grasp, one can imagine the clip region being reset to the
exact bounds of the target surface.
</para>
<para>
Note that code meant to be reusable should not call
<link linkend="cairo-reset-clip"><function>cairo_reset_clip()</function></link> as it will cause results unexpected by
higher-level code which calls <link linkend="cairo-clip"><function>cairo_clip()</function></link>. Consider using
<link linkend="cairo-save"><function>cairo_save()</function></link> and <link linkend="cairo-restore"><function>cairo_restore()</function></link> around <link linkend="cairo-clip"><function>cairo_clip()</function></link> as a more
robust means of temporarily restricting the clip region.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-glyph-t"/>cairo_glyph_t</title>
<indexterm><primary>cairo_glyph_t</primary></indexterm><programlisting>typedef struct {
  unsigned long        index;
  double               x;
  double               y;
} cairo_glyph_t;
</programlisting>
<para>
The <link linkend="cairo-glyph-t"><type>cairo_glyph_t</type></link> structure holds information about a single glyph
when drawing or measuring text. A font is (in simple terms) a
collection of shapes used to draw text. A glyph is one of these
shapes. There can be multiple glyphs for a single character
(alternates to be used in different contexts, for example), or a
glyph can be a <firstterm>ligature</firstterm> of multiple
characters. Cairo doesn't expose any way of converting input text
into glyphs, so in order to use the Cairo interfaces that take
arrays of glyphs, you must directly access the appropriate
underlying font system.
</para>
<para>
Note that the offsets given by <parameter>x</parameter> and <parameter>y</parameter> are not cumulative. When
drawing or measuring text, each glyph is individually positioned
with respect to the overall origin</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term>unsigned&nbsp;<link linkend="long">long</link>&nbsp;<structfield>index</structfield>;</term>
<listitem><simpara> glyph index in the font. The exact interpretation of the
     glyph index depends on the font technology being used.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>x</structfield>;</term>
<listitem><simpara> the offset in the X direction between the origin used for
    drawing or measuring the string and the origin of this glyph.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>y</structfield>;</term>
<listitem><simpara> the offset in the Y direction between the origin used for
    drawing or measuring the string and the origin of this glyph.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-font-slant-t"/>enum cairo_font_slant_t</title>
<indexterm><primary>cairo_font_slant_t</primary></indexterm><programlisting>typedef enum _cairo_font_slant {
  CAIRO_FONT_SLANT_NORMAL,
  CAIRO_FONT_SLANT_ITALIC,
  CAIRO_FONT_SLANT_OBLIQUE
} cairo_font_slant_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-font-weight-t"/>enum cairo_font_weight_t</title>
<indexterm><primary>cairo_font_weight_t</primary></indexterm><programlisting>typedef enum _cairo_font_weight {
  CAIRO_FONT_WEIGHT_NORMAL,
  CAIRO_FONT_WEIGHT_BOLD
} cairo_font_weight_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-select-font-face"/>cairo_select_font_face ()</title>
<indexterm><primary>cairo_select_font_face</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_select_font_face          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *family,
                                             <link linkend="cairo-font-slant-t">cairo_font_slant_t</link> slant,
                                             <link linkend="cairo-font-weight-t">cairo_font_weight_t</link> weight);</programlisting>
<para>
Selects a family and style of font from a simplified description as
a family name, slant and weight. This function is meant to be used
only for applications with simple font needs: Cairo doesn't provide
for operations such as listing all available fonts on the system,
and it is expected that most applications will need to use a more
comprehensive font handling and text layout library in addition to
Cairo.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>family</parameter>&nbsp;:</term>
<listitem><simpara> a font family name, encoded in UTF-8
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>slant</parameter>&nbsp;:</term>
<listitem><simpara> the slant for the font
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>weight</parameter>&nbsp;:</term>
<listitem><simpara> the weight for the font
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-font-size"/>cairo_set_font_size ()</title>
<indexterm><primary>cairo_set_font_size</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_font_size             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> size);</programlisting>
<para>
Sets the current font matrix to a scale by a factor of <parameter>size</parameter>, replacing
any font matrix previously set with <link linkend="cairo-set-font-size"><function>cairo_set_font_size()</function></link> or
<link linkend="cairo-set-font-matrix"><function>cairo_set_font_matrix()</function></link>. This results in a font size of <parameter>size</parameter> user space
units. (More precisely, this matrix will result in the font's
em-square being a <parameter>size</parameter> by <parameter>size</parameter> square in user space.)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> the new font size, in user space units
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-font-matrix"/>cairo_set_font_matrix ()</title>
<indexterm><primary>cairo_set_font_matrix</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_font_matrix           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting>
<para>
Sets the current font matrix to <parameter>matrix</parameter>. The font matrix gives a
transformation from the design space of the font (in this space,
the em-square is 1 unit by 1 unit) to user space. Normally, a
simple scale is used (see <link linkend="cairo-set-font-size"><function>cairo_set_font_size()</function></link>), but a more
complex font matrix can be used to shear the font
or stretch it unequally along the two axes</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link> describing a transform to be applied to
the current font.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-font-matrix"/>cairo_get_font_matrix ()</title>
<indexterm><primary>cairo_get_font_matrix</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_get_font_matrix           (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting>
<para>
Stores the current font matrix into <parameter>matrix</parameter>. See
<link linkend="cairo-set-font-matrix"><function>cairo_set_font_matrix()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&nbsp;:</term>
<listitem><simpara> return value for the matrix
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-font-options"/>cairo_set_font_options ()</title>
<indexterm><primary>cairo_set_font_options</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_font_options          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);</programlisting>
<para>
Sets a set of custom font rendering options for the <link linkend="cairo-t"><type>cairo_t</type></link>.
Rendering options are derived by merging these options with the
options derived from underlying surface; if the value in <parameter>options</parameter>
has a default value (like <literal>CAIRO_ANTIALIAS_DEFAULT</literal>), then the value
from the surface is used.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>options</parameter>&nbsp;:</term>
<listitem><simpara> font options to use
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-font-options"/>cairo_get_font_options ()</title>
<indexterm><primary>cairo_get_font_options</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_get_font_options          (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);</programlisting>
<para>
Retrieves font rendering options set via <link linkend="cairo-set-font-options"><type>cairo_set_font_options</type></link>.
Note that the returned options do not include any options derived
from the underlying surface; they are literally the options
passed to <link linkend="cairo-set-font-options"><function>cairo_set_font_options()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>options</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> object into which to store
  the retrieved options. All existing values are overwritten
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-show-text"/>cairo_show_text ()</title>
<indexterm><primary>cairo_show_text</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_show_text                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>utf8</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-show-glyphs"/>cairo_show_glyphs ()</title>
<indexterm><primary>cairo_show_glyphs</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_show_glyphs               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_glyphs</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-font-face"/>cairo_get_font_face ()</title>
<indexterm><primary>cairo_get_font_face</primary></indexterm><programlisting><link linkend="cairo-font-face-t">cairo_font_face_t</link>* cairo_get_font_face      (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current font face for a <link linkend="cairo-t"><type>cairo_t</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current font object. Can return <literal>NULL</literal>
  on out-of-memory or if the context is already in
  an error state. This object is owned by cairo. To keep
  a reference to it, you must call <link linkend="cairo-font-face-reference"><function>cairo_font_face_reference()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-font-extents"/>cairo_font_extents ()</title>
<indexterm><primary>cairo_font_extents</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_font_extents              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-extents-t">cairo_font_extents_t</link> *extents);</programlisting>
<para>
Gets the font extents for the currently selected font.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-font-extents-t"><type>cairo_font_extents_t</type></link> object into which the results
will be stored.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-set-font-face"/>cairo_set_font_face ()</title>
<indexterm><primary>cairo_set_font_face</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_set_font_face             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-font-face-t">cairo_font_face_t</link> *font_face);</programlisting>
<para>
Replaces the current <link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> object in the <link linkend="cairo-t"><type>cairo_t</type></link> with
<parameter>font_face</parameter>. The replaced font face in the <link linkend="cairo-t"><type>cairo_t</type></link> will be
destroyed if there are no other references to it.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_face</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link>, or <literal>NULL</literal> to restore to the default font
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-text-extents"/>cairo_text_extents ()</title>
<indexterm><primary>cairo_text_extents</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_text_extents              (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8,
                                             <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting>
<para>
Gets the extents for a string of text. The extents describe a
user-space rectangle that encloses the "inked" portion of the text,
(as it would be drawn by cairo_show_text). Additionally, the
x_advance and y_advance values indicate the amount by which the
current point would be advanced by cairo_show_text.
</para>
<para>
Note that whitespace characters do not directly contribute to the
size of the rectangle (extents.width and extents.height). They do
contribute indirectly by changing the position of non-whitespace
characters. In particular, trailing whitespace characters are
likely to not affect the size of the rectangle, though they will
affect the x_advance and y_advance values.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>utf8</parameter>&nbsp;:</term>
<listitem><simpara> a string of text, encoded in utf-8
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> object into which the results
will be stored.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-glyph-extents"/>cairo_glyph_extents ()</title>
<indexterm><primary>cairo_glyph_extents</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_glyph_extents             (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs,
                                             <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting>
<para>
Gets the extents for an array of glyphs. The extents describe a
user-space rectangle that encloses the "inked" portion of the
glyphs, (as they would be drawn by cairo_show_glyphs).
Additionally, the x_advance and y_advance values indicate the
amount by which the current point would be advanced by
cairo_show_glyphs.
</para>
<para>
Note that whitespace glyphs do not contribute to the size of the
rectangle (extents.width and extents.height).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-t"><type>cairo_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara> an array of <link linkend="cairo-glyph-t"><type>cairo_glyph_t</type></link> objects
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_glyphs</parameter>&nbsp;:</term>
<listitem><simpara> the number of elements in <parameter>glyphs</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> object into which the results
will be stored
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-text-path"/>cairo_text_path ()</title>
<indexterm><primary>cairo_text_path</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_text_path                 (<link linkend="cairo-t">cairo_t</link> *cr,
                                             const <link linkend="char">char</link> *utf8);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>utf8</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-glyph-path"/>cairo_glyph_path ()</title>
<indexterm><primary>cairo_glyph_path</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_glyph_path                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                             <link linkend="int">int</link> num_glyphs);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_glyphs</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-operator"/>cairo_get_operator ()</title>
<indexterm><primary>cairo_get_operator</primary></indexterm><programlisting><link linkend="cairo-operator-t">cairo_operator_t</link> cairo_get_operator         (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current compositing operator for a cairo context.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current compositing operator.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-source"/>cairo_get_source ()</title>
<indexterm><primary>cairo_get_source</primary></indexterm><programlisting><link linkend="cairo-pattern-t">cairo_pattern_t</link>* cairo_get_source           (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current source pattern for <parameter>cr</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current source pattern. This object is owned by
cairo. To keep a reference to it, you must call
<link linkend="cairo-pattern-reference"><function>cairo_pattern_reference()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-tolerance"/>cairo_get_tolerance ()</title>
<indexterm><primary>cairo_get_tolerance</primary></indexterm><programlisting><link linkend="double">double</link>      cairo_get_tolerance             (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current tolerance value, as set by <link linkend="cairo-set-tolerance"><function>cairo_set_tolerance()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current tolerance value.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-current-point"/>cairo_get_current_point ()</title>
<indexterm><primary>cairo_get_current_point</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_get_current_point         (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="double">double</link> *x,
                                             <link linkend="double">double</link> *y);</programlisting>
<para>
Gets the current point of the current path, which is
conceptually the final point reached by the path so far.
</para>
<para>
The current point is returned in the user-space coordinate
system. If there is no defined current point then <parameter>x</parameter> and <parameter>y</parameter> will
both be set to 0.0.
</para>
<para>
Most path construction functions alter the current point. See the
following for details on how they affect the current point:
</para>
<para>
<link linkend="cairo-new-path"><function>cairo_new_path()</function></link>, <link linkend="cairo-move-to"><function>cairo_move_to()</function></link>, <link linkend="cairo-line-to"><function>cairo_line_to()</function></link>,
<link linkend="cairo-curve-to"><function>cairo_curve_to()</function></link>, <link linkend="cairo-arc"><function>cairo_arc()</function></link>, <link linkend="cairo-rel-move-to"><function>cairo_rel_move_to()</function></link>,
<link linkend="cairo-rel-line-to"><function>cairo_rel_line_to()</function></link>, <link linkend="cairo-rel-curve-to"><function>cairo_rel_curve_to()</function></link>, <link linkend="cairo-arc"><function>cairo_arc()</function></link>,
<link linkend="cairo-text-path"><function>cairo_text_path()</function></link>, <link linkend="cairo-stroke-to-path"><function>cairo_stroke_to_path()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> return value for X coordinate of the current point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> return value for Y coordinate of the current point
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-fill-rule"/>cairo_get_fill_rule ()</title>
<indexterm><primary>cairo_get_fill_rule</primary></indexterm><programlisting><link linkend="cairo-fill-rule-t">cairo_fill_rule_t</link> cairo_get_fill_rule       (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current fill rule, as set by <link linkend="cairo-set-fill-rule"><function>cairo_set_fill_rule()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current fill rule.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-line-width"/>cairo_get_line_width ()</title>
<indexterm><primary>cairo_get_line_width</primary></indexterm><programlisting><link linkend="double">double</link>      cairo_get_line_width            (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current line width, as set by <link linkend="cairo-set-line-width"><function>cairo_set_line_width()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current line width, in user-space units.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-line-cap"/>cairo_get_line_cap ()</title>
<indexterm><primary>cairo_get_line_cap</primary></indexterm><programlisting><link linkend="cairo-line-cap-t">cairo_line_cap_t</link> cairo_get_line_cap         (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current line cap style, as set by <link linkend="cairo-set-line-cap"><function>cairo_set_line_cap()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current line cap style.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-line-join"/>cairo_get_line_join ()</title>
<indexterm><primary>cairo_get_line_join</primary></indexterm><programlisting><link linkend="cairo-line-join-t">cairo_line_join_t</link> cairo_get_line_join       (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current line join style, as set by <link linkend="cairo-set-line-join"><function>cairo_set_line_join()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current line join style.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-miter-limit"/>cairo_get_miter_limit ()</title>
<indexterm><primary>cairo_get_miter_limit</primary></indexterm><programlisting><link linkend="double">double</link>      cairo_get_miter_limit           (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the current miter limit, as set by <link linkend="cairo-set-miter-limit"><function>cairo_set_miter_limit()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current miter limit.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-matrix"/>cairo_get_matrix ()</title>
<indexterm><primary>cairo_get_matrix</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_get_matrix                (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting>
<para>
Stores the current transformation matrix (CTM) into <parameter>matrix</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&nbsp;:</term>
<listitem><simpara> return value for the matrix
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-get-target"/>cairo_get_target ()</title>
<indexterm><primary>cairo_get_target</primary></indexterm><programlisting><link linkend="cairo-surface-t">cairo_surface_t</link>* cairo_get_target           (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets the target surface for the cairo context as passed to
<link linkend="cairo-create"><function>cairo_create()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the target surface. This object is owned by cairo. To
keep a reference to it, you must call <link linkend="cairo-surface-reference"><function>cairo_surface_reference()</function></link>.

This function will always return a valid pointer, but the result
can be a "nil" surface if <parameter>cr</parameter> is already in an error state,
(ie. cairo_status(cr) != CAIRO_STATUS_SUCCESS). A nil surface is
indicated by cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-copy-path"/>cairo_copy_path ()</title>
<indexterm><primary>cairo_copy_path</primary></indexterm><programlisting><link linkend="cairo-path-t">cairo_path_t</link>* cairo_copy_path               (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Creates a copy of the current path and returns it to the user as a
<link linkend="cairo-path-t"><type>cairo_path_t</type></link>. See <link linkend="cairo-path-data-t"><type>cairo_path_data_t</type></link> for hints on how to iterate
over the returned data structure.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the copy of the current path. The caller owns the
returned object and should call <link linkend="cairo-path-destroy"><function>cairo_path_destroy()</function></link> when finished
with it.

This function will always return a valid pointer, but the result
will have no data, (data==NULL and num_data==0), if either of the
following conditions hold:

1) If there is insufficient memory to copy the path.

2) If <parameter>cr</parameter> is already in an error state.

In either case, path->status will be set to CAIRO_STATUS_NO_MEMORY,
(regardless of what the error status in <parameter>cr</parameter> might have been).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-copy-path-flat"/>cairo_copy_path_flat ()</title>
<indexterm><primary>cairo_copy_path_flat</primary></indexterm><programlisting><link linkend="cairo-path-t">cairo_path_t</link>* cairo_copy_path_flat          (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>
Gets a flattened copy of the current path and returns it to the
user as a <link linkend="cairo-path-t"><type>cairo_path_t</type></link>. See <link linkend="cairo-path-data-t"><type>cairo_path_data_t</type></link> for hints on
how to iterate over the returned data structure.
</para>
<para>
This function is like <link linkend="cairo-copy-path"><function>cairo_copy_path()</function></link> except that any curves
in the path will be approximated with piecewise-linear
approximations, (accurate to within the current tolerance
value). That is, the result is guaranteed to not have any elements
of type CAIRO_PATH_CURVE_TO which will instead be replaced by a
series of CAIRO_PATH_LINE_TO elements.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the copy of the current path. The caller owns the
returned object and should call <link linkend="cairo-path-destroy"><function>cairo_path_destroy()</function></link> when finished
with it.

This function will always return a valid pointer, but the result
will have no data, (data==NULL and num_data==0), if either of the
following conditions hold:

1) If there is insufficient memory to copy the path. In this case
   path->status will be set to CAIRO_STATUS_NO_MEMORY.

2) If <parameter>cr</parameter> is already in an error state. In this case path->status
   will contain the same status that would be returned by
   cairo_status(cr).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-append-path"/>cairo_append_path ()</title>
<indexterm><primary>cairo_append_path</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_append_path               (<link linkend="cairo-t">cairo_t</link> *cr,
                                             <link linkend="cairo-path-t">cairo_path_t</link> *path);</programlisting>
<para>
Append the <parameter>path</parameter> onto the current path. The <parameter>path</parameter> may be either the
return value from one of <link linkend="cairo-copy-path"><function>cairo_copy_path()</function></link> or
<link linkend="cairo-copy-path-flat"><function>cairo_copy_path_flat()</function></link> or it may be constructed manually.  See
<link linkend="cairo-path-t"><type>cairo_path_t</type></link> for details on how the path data structure should be
initialized, and note that path->status must be initialized to
CAIRO_STATUS_SUCCESS.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara> a cairo context
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> path to be appended
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-path-data-type-t"/>enum cairo_path_data_type_t</title>
<indexterm><primary>cairo_path_data_type_t</primary></indexterm><programlisting>typedef enum _cairo_path_data_type {
    CAIRO_PATH_MOVE_TO,
    CAIRO_PATH_LINE_TO,
    CAIRO_PATH_CURVE_TO,
    CAIRO_PATH_CLOSE_PATH
} cairo_path_data_type_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-path-t"/>cairo_path_t</title>
<indexterm><primary>cairo_path_t</primary></indexterm><programlisting>typedef struct {
    cairo_status_t status;
    cairo_path_data_t *data;
    int num_data;
} cairo_path_t;
</programlisting>
<para>
A data structure for holding a path. This data structure serves as
the return value for <link linkend="cairo-copy-path-data"><function>cairo_copy_path_data()</function></link> and
<link linkend="cairo-copy-path-data-flat"><function>cairo_copy_path_data_flat()</function></link> as well the input value for
<link linkend="cairo-append-path"><function>cairo_append_path()</function></link>.
</para>
<para>
See <link linkend="cairo-path-data-t"><type>cairo_path_data_t</type></link> for hints on how to iterate over the
actual data within the path.
</para>
<para>
The num_data member gives the number of elements in the data
array. This number is larger than the number of independent path
portions (MOVE_TO, LINE_TO, CURVE_TO, CLOSE_PATH), since the data
includes both headers and coordinates for each portion.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="cairo-status-t">cairo_status_t</link>&nbsp;<structfield>status</structfield>;</term>
<listitem><simpara> the current error status
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="cairo-path-data-t">cairo_path_data_t</link>&nbsp;*<structfield>data</structfield>;</term>
<listitem><simpara> the elements in the path
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>num_data</structfield>;</term>
<listitem><simpara> the number of elements in the data array
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-path-destroy"/>cairo_path_destroy ()</title>
<indexterm><primary>cairo_path_destroy</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_path_destroy              (<link linkend="cairo-path-t">cairo_path_t</link> *path);</programlisting>
<para>
Immediately releases all memory associated with <parameter>path</parameter>. After a call
to <link linkend="cairo-path-destroy"><function>cairo_path_destroy()</function></link> the <parameter>path</parameter> pointer is no longer valid and
should not be used further.
</para>
<para>
NOTE: cairo_path_destroy function should only be called with a
pointer to a <link linkend="cairo-path-t"><type>cairo_path_t</type></link> returned by a cairo function. Any path
that is created manually (ie. outside of cairo) should be destroyed
manually as well.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> a path to destroy which was previously returned by either
cairo_copy_path or cairo_copy_path_flat.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-status-t"/>enum cairo_status_t</title>
<indexterm><primary>cairo_status_t</primary></indexterm><programlisting>typedef enum _cairo_status {
    CAIRO_STATUS_SUCCESS = 0,
    CAIRO_STATUS_NO_MEMORY,
    CAIRO_STATUS_INVALID_RESTORE,
    CAIRO_STATUS_INVALID_POP_GROUP,
    CAIRO_STATUS_NO_CURRENT_POINT,
    CAIRO_STATUS_INVALID_MATRIX,
    CAIRO_STATUS_INVALID_STATUS,
    CAIRO_STATUS_NULL_POINTER,
    CAIRO_STATUS_INVALID_STRING,
    CAIRO_STATUS_INVALID_PATH_DATA,
    CAIRO_STATUS_READ_ERROR,
    CAIRO_STATUS_WRITE_ERROR,
    CAIRO_STATUS_SURFACE_FINISHED,
    CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
    CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
    CAIRO_STATUS_INVALID_CONTENT,
    CAIRO_STATUS_INVALID_FORMAT,
    CAIRO_STATUS_INVALID_VISUAL,
    CAIRO_STATUS_FILE_NOT_FOUND
} cairo_status_t;
</programlisting>
<para>
<link linkend="cairo-status-t"><type>cairo_status_t</type></link> is used to indicate errors that can occur when
using Cairo. In some cases it is returned directly by functions.
but when using <link linkend="cairo-t"><type>cairo_t</type></link>, the last error, if any, is stored in
the context and can be retrieved with <link linkend="cairo-status"><function>cairo_status()</function></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>CAIRO_STATUS_SUCCESS</literal></term>
<listitem><simpara> no error has occurred
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_NO_MEMORY</literal></term>
<listitem><simpara> out of memory
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_RESTORE</literal></term>
<listitem><simpara> cairo_restore without matching cairo_save
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_POP_GROUP</literal></term>
<listitem><simpara> no saved group to pop
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_NO_CURRENT_POINT</literal></term>
<listitem><simpara> no current point defined
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_MATRIX</literal></term>
<listitem><simpara> invalid matrix (not invertible)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_STATUS</literal></term>
<listitem><simpara> invalid value for an input cairo_status_t
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_NULL_POINTER</literal></term>
<listitem><simpara> NULL pointer
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_STRING</literal></term>
<listitem><simpara> input string not valid UTF-8
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_PATH_DATA</literal></term>
<listitem><simpara> input path data not valid
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_READ_ERROR</literal></term>
<listitem><simpara> error while reading from input stream
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_WRITE_ERROR</literal></term>
<listitem><simpara> error while writing to output stream
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_SURFACE_FINISHED</literal></term>
<listitem><simpara> target surface has been finished
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_SURFACE_TYPE_MISMATCH</literal></term>
<listitem><simpara> the surface type is not appropriate for the operation
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_PATTERN_TYPE_MISMATCH</literal></term>
<listitem><simpara> the pattern type is not appropriate for the operation
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_CONTENT</literal></term>
<listitem><simpara> invalid value for an input cairo_content_t
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_FORMAT</literal></term>
<listitem><simpara> invalid value for an input cairo_format_t
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_INVALID_VISUAL</literal></term>
<listitem><simpara> invalid value for an input Visual*
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>CAIRO_STATUS_FILE_NOT_FOUND</literal></term>
<listitem><simpara> file not found
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-status"/>cairo_status ()</title>
<indexterm><primary>cairo_status</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link> cairo_status                 (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cr</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-status-string"/>cairo_status_string</title>
<indexterm><primary>cairo_status_string</primary></indexterm><programlisting>#define cairo_status_string		cairo_status_string_DEPRECATED_BY_cairo_status_AND_cairo_status_to_string
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-status-to-string"/>cairo_status_to_string ()</title>
<indexterm><primary>cairo_status_to_string</primary></indexterm><programlisting>const <link linkend="char">char</link>* cairo_status_to_string          (<link linkend="cairo-status-t">cairo_status_t</link> status);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-filter-t"/>enum cairo_filter_t</title>
<indexterm><primary>cairo_filter_t</primary></indexterm><programlisting>typedef enum _cairo_filter {
    CAIRO_FILTER_FAST,
    CAIRO_FILTER_GOOD,
    CAIRO_FILTER_BEST,
    CAIRO_FILTER_NEAREST,
    CAIRO_FILTER_BILINEAR,
    CAIRO_FILTER_GAUSSIAN
} cairo_filter_t;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-image-surface-create"/>cairo_image_surface_create ()</title>
<indexterm><primary>cairo_image_surface_create</primary></indexterm><programlisting><link linkend="cairo-surface-t">cairo_surface_t</link>* cairo_image_surface_create (<link linkend="cairo-format-t">cairo_format_t</link> format,
                                             <link linkend="int">int</link> width,
                                             <link linkend="int">int</link> height);</programlisting>
<para>
Creates an image surface of the specified format and
dimensions. The initial contents of the surface is undefined; you
must explicitely clear the buffer, using, for example,
<link linkend="cairo-rectangle"><function>cairo_rectangle()</function></link> and <link linkend="cairo-fill"><function>cairo_fill()</function></link> if you want it cleared.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara> format of pixels in the surface to create 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> width of the surface, in pixels
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> height of the surface, in pixels
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created surface, or <literal>NULL</literal> if it couldn't
  be created because of lack of memory
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-image-surface-create-for-data"/>cairo_image_surface_create_for_data ()</title>
<indexterm><primary>cairo_image_surface_create_for_data</primary></indexterm><programlisting><link linkend="cairo-surface-t">cairo_surface_t</link>* cairo_image_surface_create_for_data
                                            (unsigned <link linkend="char">char</link> *data,
                                             <link linkend="cairo-format-t">cairo_format_t</link> format,
                                             <link linkend="int">int</link> width,
                                             <link linkend="int">int</link> height,
                                             <link linkend="int">int</link> stride);</programlisting>
<para>
Creates an image surface for the provided pixel data. The output
buffer must be kept around until the <link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> is destroyed
or <link linkend="cairo-surface-finish"><function>cairo_surface_finish()</function></link> is called on the surface.  The initial
contents of <parameter>buffer</parameter> will be used as the inital image contents; you
must explicitely clear the buffer, using, for example,
<link linkend="cairo-rectangle"><function>cairo_rectangle()</function></link> and <link linkend="cairo-fill"><function>cairo_fill()</function></link> if you want it cleared.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a buffer supplied by the application
   in which to write contents.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara> the format of pixels in the buffer
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the width of the image to be stored in the buffer
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the height of the image to be stored in the buffer
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stride</parameter>&nbsp;:</term>
<listitem><simpara> the number of bytes between the start of rows
  in the buffer. Having this be specified separate from <parameter>width</parameter>
  allows for padding at the end of rows, or for writing
  to a subportion of a larger image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created surface, or <literal>NULL</literal> if it couldn't
  be created because of lack of memory
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-image-surface-get-width"/>cairo_image_surface_get_width ()</title>
<indexterm><primary>cairo_image_surface_get_width</primary></indexterm><programlisting><link linkend="int">int</link>         cairo_image_surface_get_width   (<link linkend="cairo-surface-t">cairo_surface_t</link> *surface);</programlisting>
<para>
Get the width of the image surface in pixels.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>surface</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-image-surface-t"><type>cairo_image_surface_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the width of the surface in pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-image-surface-get-height"/>cairo_image_surface_get_height ()</title>
<indexterm><primary>cairo_image_surface_get_height</primary></indexterm><programlisting><link linkend="int">int</link>         cairo_image_surface_get_height  (<link linkend="cairo-surface-t">cairo_surface_t</link> *surface);</programlisting>
<para>
Get the height of the image surface in pixels.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>surface</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-image-surface-t"><type>cairo_image_surface_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the height of the surface in pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-destroy-func-t"/>cairo_destroy_func_t ()</title>
<indexterm><primary>cairo_destroy_func_t</primary></indexterm><programlisting><link linkend="void">void</link>        (*cairo_destroy_func_t)         (<link linkend="void">void</link> *data);</programlisting>
<para>
<link linkend="cairo-destroy-func-t"><type>cairo_destroy_func_t</type></link> the type of function which is called when a
data element is destroyed. It is passed the pointer to the data
element and should free any memory and resources allocated for it.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> The data element being destroyed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-user-data-key-t"/>cairo_user_data_key_t</title>
<indexterm><primary>cairo_user_data_key_t</primary></indexterm><programlisting>typedef struct {
    int unused;
} cairo_user_data_key_t;
</programlisting>
<para>
<link linkend="cairo-user-data-key-t"><type>cairo_user_data_key_t</type></link> is used for attaching user data to cairo
data structures.  The actual contents of the struct is never used,
and there is no need to initialize the object; only the unique
address of a <link linkend="cairo-data-key-t"><type>cairo_data_key_t</type></link> object is used.  Typically, you
would just use the address of a static <link linkend="cairo-data-key-t"><type>cairo_data_key_t</type></link> object.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>unused</structfield>;</term>
<listitem><simpara> not used; ignore.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-read-func-t"/>cairo_read_func_t ()</title>
<indexterm><primary>cairo_read_func_t</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link> (*cairo_read_func_t)         (<link linkend="void">void</link> *closure,
                                             unsigned <link linkend="char">char</link> *data,
                                             unsigned <link linkend="int">int</link> length);</programlisting>
<para>
<link linkend="cairo-read-func-t"><type>cairo_read_func_t</type></link> is the type of function which is called when a
backend needs to read data from an intput stream.  It is passed the
closure which was specified by the user at the time the read
function was registered, the buffer to read the data into and the
length of the data in bytes.  The read function should return
CAIRO_STATUS_SUCCESS if all the data was successfully read,
CAIRO_STATUS_READ_ERROR otherwise.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> the input closure
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> the buffer into which to read the data
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> the amount of data to read
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the status code of the read operation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-write-func-t"/>cairo_write_func_t ()</title>
<indexterm><primary>cairo_write_func_t</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link> (*cairo_write_func_t)        (<link linkend="void">void</link> *closure,
                                             unsigned <link linkend="char">char</link> *data,
                                             unsigned <link linkend="int">int</link> length);</programlisting>
<para>
<link linkend="cairo-write-func-t"><type>cairo_write_func_t</type></link> is the type of function which is called when a
backend needs to write data to an output stream.  It is passed the
closure which was specified by the user at the time the write
function was registered, the data to write and the length of the
data in bytes.  The write function should return
CAIRO_STATUS_SUCCESS if all the data was successfully written,
CAIRO_STATUS_WRITE_ERROR otherwise.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> the output closure
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> the buffer containing the data to write
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> the amount of data to write
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the status code of the write operation
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>