/usr/share/guile/site/cairo/cairo-procedures.txt is in guile-cairo 1.4.0-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 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 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 | WARNING: (gnome gw support gtk-doc): `filter' imported from both (srfi srfi-1) and (sxml xpath)
cairo-font-options-create
- Function: cairo-font-options-create ==>(RET `<cairo-font-options-t>')
Allocates a new font options object with all options initialized to default
values.
ret
a newly allocated `<cairo-font-options-t>'. Free with
`cairo-font-options-destroy'. This function always returns a valid
pointer; if memory cannot be allocated, then a special error object is
returned where all operations on the object do nothing. You can check
for this with `cairo-font-options-status'.
This documentation was automatically generated.
cairo-font-options-copy
- Function: cairo-font-options-copy (ORIGINAL `<cairo-font-options-t>') ==>(RET
`<cairo-font-options-t>')
Allocates a new font options object copying the option values from
ORIGINAL.
original
a `<cairo-font-options-t>'
ret
a newly allocated `<cairo-font-options-t>'. Free with
`cairo-font-options-destroy'. This function always returns a valid
pointer; if memory cannot be allocated, then a special error object is
returned where all operations on the object do nothing. You can check
for this with `cairo-font-options-status'.
This documentation was automatically generated.
cairo-font-options-merge
- Function: cairo-font-options-merge (OPTIONS `<cairo-font-options-t>')(OTHER
`<cairo-font-options-t>')
Merges non-default options from OTHER into OPTIONS, replacing existing
values. This operation can be thought of as somewhat similar to compositing
OTHER onto OPTIONS with the operation of `CAIRO_OPERATION_OVER'.
options
a `<cairo-font-options-t>'
other
another `<cairo-font-options-t>'
This documentation was automatically generated.
cairo-font-options-hash
- Function: cairo-font-options-hash (OPTIONS `<cairo-font-options-t>') ==>(RET
`<unsigned long>')
Compute a hash for the font options object; this value will be useful when
storing an object containing a cairo_font_options_t in a hash table.
options
a `<cairo-font-options-t>'
ret
the hash value for the font options object. The return value can be
cast to a 32-bit type if a 32-bit hash value is needed.
This documentation was automatically generated.
cairo-font-options-set-antialias
- Function: cairo-font-options-set-antialias (OPTIONS
`<cairo-font-options-t>')(ANTIALIAS `<cairo-antialias-t>')
Sets the antialiasing mode for the font options object. This specifies the
type of antialiasing to do when rendering text.
options
a `<cairo-font-options-t>'
antialias
the new antialiasing mode
This documentation was automatically generated.
cairo-font-options-get-antialias
- Function: cairo-font-options-get-antialias (OPTIONS `<cairo-font-options-t>')
==>(RET `<cairo-antialias-t>')
Gets the antialiasing mode for the font options object.
options
a `<cairo-font-options-t>'
ret
the antialiasing mode
This documentation was automatically generated.
cairo-font-options-set-hint-style
- Function: cairo-font-options-set-hint-style (OPTIONS
`<cairo-font-options-t>')(HINT-STYLE `<cairo-hint-style-t>')
Sets the hint style for font outlines for the font options object. This
controls whether to fit font outlines to the pixel grid, and if so, whether
to optimize for fidelity or contrast. See the documentation for
`<cairo-hint-style-t>' for full details.
options
a `<cairo-font-options-t>'
hint-style
the new hint style
This documentation was automatically generated.
cairo-font-options-get-hint-style
- Function: cairo-font-options-get-hint-style (OPTIONS `<cairo-font-options-t>')
==>(RET `<cairo-hint-style-t>')
Gets the hint style for font outlines for the font options object. See the
documentation for `<cairo-hint-style-t>' for full details.
options
a `<cairo-font-options-t>'
ret
the hint style for the font options object
This documentation was automatically generated.
cairo-font-options-set-hint-metrics
- Function: cairo-font-options-set-hint-metrics (OPTIONS
`<cairo-font-options-t>')(HINT-METRICS `<cairo-hint-metrics-t>')
Sets the metrics hinting mode for the font options object. This controls
whether metrics are quantized to integer values in device units. See the
documentation for `<cairo-hint-metrics-t>' for full details.
options
a `<cairo-font-options-t>'
hint-metrics
the new metrics hinting mode
This documentation was automatically generated.
cairo-font-face-get-type
- Function: cairo-font-face-get-type (FONT-FACE `<cairo-font-face-t>') ==>(RET
`<cairo-font-type-t>')
This function returns the type of the backend used to create a font face.
See `<cairo-font-type-t>' for available types.
font-face
a font face
ret
The type of FONT-FACE.
Since 1.2
This documentation was automatically generated.
cairo-image-surface-create
- Function: cairo-image-surface-create (FORMAT `<cairo-format-t>')(WIDTH
`<int>')(HEIGHT `<int>') ==>(RET `<cairo-surface-t>')
Creates an image surface of the specified format and dimensions. Initially
the surface contents are all 0. (Specifically, within each pixel, each
color or alpha channel belonging to format will be 0. The contents of bits
within a pixel, but not belonging to the given format are undefined).
format
format of pixels in the surface to create
width
width of the surface, in pixels
height
height of the surface, in pixels
ret
a pointer to the newly created surface. The caller owns the surface
and should call cairo_surface_destroy when done with it. This function
always returns a valid pointer, but it will return a pointer to a
"nil" surface if an error such as out of memory occurs. You can use
`cairo-surface-status' to check for this.
This documentation was automatically generated.
cairo-image-surface-get-format
- Function: cairo-image-surface-get-format (SURFACE `<cairo-surface-t>') ==>(RET
`<cairo-format-t>')
Get the format of the surface.
surface
a `<cairo-image-surface-t>'
ret
the format of the surface
Since 1.2
This documentation was automatically generated.
cairo-image-surface-get-width
- Function: cairo-image-surface-get-width (SURFACE `<cairo-surface-t>') ==>(RET
`<int>')
Get the width of the image surface in pixels.
surface
a `<cairo-image-surface-t>'
ret
the width of the surface in pixels.
This documentation was automatically generated.
cairo-matrix-translate
- Function: cairo-matrix-translate (MATRIX `<cairo-matrix-t>')(TX `<double>')(TY
`<double>')
Applies a translation by TX, TY to the transformation in MATRIX. The effect
of the new transformation is to first translate the coordinates by TX and
TY, then apply the original transformation to the coordinates.
matrix
a cairo_matrix_t
tx
amount to translate in the X direction
ty
amount to translate in the Y direction
This documentation was automatically generated.
cairo-matrix-invert
- Function: cairo-matrix-invert (MATRIX `<cairo-matrix-t>') ==>(RET
`<cairo-status-t>')
Changes MATRIX to be the inverse of it's original value. Not all
transformation matrices have inverses; if the matrix collapses points
together (it is "degenerate"), then it has no inverse and this function
will fail.
Returns: If MATRIX has an inverse, modifies MATRIX to be the inverse matrix
and returns `CAIRO_STATUS_SUCCESS'. Otherwise,
matrix
a `<cairo-matrix-t>'
ret
`CAIRO_STATUS_INVALID_MATRIX'.
This documentation was automatically generated.
cairo-matrix-multiply
- Function: cairo-matrix-multiply (RESULT `<cairo-matrix-t>')(A
`<cairo-matrix-t>')(B `<cairo-matrix-t>')
Multiplies the affine transformations in A and B together and stores the
result in RESULT. The effect of the resulting transformation is to first
apply the transformation in A to the coordinates and then apply the
transformation in B to the coordinates.
It is allowable for RESULT to be identical to either A or B.
result
a `<cairo-matrix-t>' in which to store the result
a
a `<cairo-matrix-t>'
b
a `<cairo-matrix-t>'
This documentation was automatically generated.
cairo-matrix-transform-distance
- Function: cairo-matrix-transform-distance (MATRIX `<cairo-matrix-t>') ==>(DX
`<double>')(DY `<double>')
Transforms the distance vector (DX,DY) by MATRIX. This is similar to
`cairo-matrix-transform-point' except that the translation components of
the transformation are ignored. The calculation of the returned vector is
as follows:
dx2 = dx1 * a + dy1 * c;
dy2 = dx1 * b + dy1 * d;
Affine transformations are position invariant, so the same vector always
transforms to the same vector. If (X1,Y1) transforms to (X2,Y2) then
(X1+DX1,Y1+DY1) will transform to (X1+DX2,Y1+DY2) for all values of X1 and
X2.
matrix
a `<cairo-matrix-t>'
dx
X component of a distance vector. An in/out parameter
dy
Y component of a distance vector. An in/out parameter
This documentation was automatically generated.
cairo-matrix-transform-point
- Function: cairo-matrix-transform-point (MATRIX `<cairo-matrix-t>') ==>(X
`<double>')(Y `<double>')
Transforms the point (X, Y) by MATRIX.
matrix
a `<cairo-matrix-t>'
x
X position. An in/out parameter
y
Y position. An in/out parameter
This documentation was automatically generated.
cairo-copy-path
- Function: cairo-copy-path (CR `<cairo-t>') ==>(RET `<cairo-path-t>')
Creates a copy of the current path and returns it to the user as a
`<cairo-path-t>'. See `<cairo-path-data-t>' for hints on how to iterate
over the returned data structure.
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:
If ther1. s insufficient memory to copy the path. In this
case `path->status' will be set to
`CAIRO_STATUS_NO_MEMORY'.If CR i2. lready in an error state. In this case
`path->status' will contain the same status that
would be returned by `cairo-status'. In either case, `path->status' will be set to `CAIRO_STATUS_NO_MEMORY'
(regardless of what the error status in CR might have been).
cr
a cairo context
ret
the copy of the current path. The caller owns the returned object and
should call `cairo-path-destroy' when finished with it.
This documentation was automatically generated.
cairo-copy-path-flat
- Function: cairo-copy-path-flat (CR `<cairo-t>') ==>(RET `<cairo-path-t>')
Gets a flattened copy of the current path and returns it to the user as a
`<cairo-path-t>'. See `<cairo-path-data-t>' for hints on how to iterate
over the returned data structure.
This function is like `cairo-copy-path' 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.
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:
If ther1. s insufficient memory to copy the path. In this
case `path->status' will be set to
`CAIRO_STATUS_NO_MEMORY'.If CR i2. lready in an error state. In this case
`path->status' will contain the same status that
would be returned by `cairo-status'. cr
a cairo context
ret
the copy of the current path. The caller owns the returned object and
should call `cairo-path-destroy' when finished with it.
This documentation was automatically generated.
cairo-append-path
- Function: cairo-append-path (CR `<cairo-t>')(PATH `<cairo-path-t>')
Append the PATH onto the current path. The PATH may be either the return
value from one of `cairo-copy-path' or `cairo-copy-path-flat' or it may be
constructed manually. See `<cairo-path-t>' for details on how the path data
structure should be initialized, and note that `path->status' must be
initialized to `CAIRO_STATUS_SUCCESS'.
cr
a cairo context
path
path to be appended
This documentation was automatically generated.
cairo-get-current-point
- Function: cairo-get-current-point (CR `<cairo-t>') ==>(X `<double>')(Y
`<double>')
Gets the current point of the current path, which is conceptually the final
point reached by the path so far.
The current point is returned in the user-space coordinate system. If there
is no defined current point then X and Y will both be set to 0.0.
Most path construction functions alter the current point. See the following
for details on how they affect the current point:
`cairo-new-path', `cairo-move-to', `cairo-line-to', `cairo-curve-to',
`cairo-arc', `cairo-rel-move-to', `cairo-rel-line-to',
`cairo-rel-curve-to', `cairo-arc', `cairo-text-path',
`cairo-stroke-to-path'
cr
a cairo context
x
return value for X coordinate of the current point
y
return value for Y coordinate of the current point
This documentation was automatically generated.
cairo-new-path
- Function: cairo-new-path (CR `<cairo-t>')
Clears the current path. After this call there will be no path and no
current point.
cr
a cairo context
This documentation was automatically generated.
cairo-new-sub-path
- Function: cairo-new-sub-path (CR `<cairo-t>')
Begin a new sub-path. Note that the existing path is not affected. After
this call there will be no current point.
In many cases, this call is not needed since new sub-paths are frequently
started with `cairo-move-to'.
A call to `cairo-new-sub-path' is particularly useful when beginning a new
sub-path with one of the `cairo-arc' calls. This makes things easier as it
is no longer necessary to manually compute the arc's initial coordinates
for a call to `cairo-move-to'.
cr
a cairo context
Since 1.2
This documentation was automatically generated.
cairo-close-path
- Function: cairo-close-path (CR `<cairo-t>')
Adds a line segment to the path from the current point to the beginning of
the current sub-path, (the most recent point passed to `cairo-move-to'),
and closes this sub-path. After this call the current point will be at the
joined endpoint of the sub-path.
The behavior of `cairo-close-path' is distinct from simply calling
`cairo-line-to' with the equivalent coordinate in the case of stroking.
When a closed sub-path is stroked, there are no caps on the ends of the
sub-path. Instead, there is a line join connecting the final and initial
segments of the sub-path.
If there is no current point before the call to cairo_close_path, this
function will have no effect.
Note: As of cairo version 1.2.4 any call to cairo_close_path will place an
explicit MOVE_TO element into the path immediately after the CLOSE_PATH
element, (which can be seen in `cairo-copy-path' for example). This can
simplify path processing in some cases as it may not be necessary to save
the "last move_to point" during processing as the MOVE_TO immediately after
the CLOSE_PATH will provide that point.
cr
a cairo context
This documentation was automatically generated.
cairo-arc
- Function: cairo-arc (CR `<cairo-t>')(XC `<double>')(YC `<double>')(RADIUS
`<double>')(ANGLE1 `<double>')(ANGLE2 `<double>')
Adds a circular arc of the given RADIUS to the current path. The arc is
centered at (XC, YC), begins at ANGLE1 and proceeds in the direction of
increasing angles to end at ANGLE2. If ANGLE2 is less than ANGLE1 it will
be progressively increased by 2*M_PI until it is greater than ANGLE1.
If there is a current point, an initial line segment will be added to the
path to connect the current point to the beginning of the arc.
Angles are measured in radians. An angle of 0.0 is in the direction of the
positive X axis (in user space). An angle of `M_PI'/2.0 radians (90
degrees) is in the direction of the positive Y axis (in user space). Angles
increase in the direction from the positive X axis toward the positive Y
axis. So with the default transformation matrix, angles increase in a
clockwise direction.
(To convert from degrees to radians, use `degrees * (M_PI / 180.)'.)
This function gives the arc in the direction of increasing angles; see
`cairo-arc-negative' to get the arc in the direction of decreasing angles.
The arc is circular in user space. To achieve an elliptical arc, you can
scale the current transformation matrix by different amounts in the X and Y
directions. For example, to draw an ellipse in the box given by X, Y,
WIDTH, HEIGHT:
cairo_save (cr);
cairo_translate (cr, x + width / 2., y + height / 2.);
cairo_scale (cr, width / 2., height / 2.);
cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI);
cairo_restore (cr);
cr
a cairo context
xc
X position of the center of the arc
yc
Y position of the center of the arc
radius
the radius of the arc
angle1
the start angle, in radians
angle2
the end angle, in radians
This documentation was automatically generated.
cairo-arc-negative
- Function: cairo-arc-negative (CR `<cairo-t>')(XC `<double>')(YC
`<double>')(RADIUS `<double>')(ANGLE1 `<double>')(ANGLE2 `<double>')
Adds a circular arc of the given RADIUS to the current path. The arc is
centered at (XC, YC), begins at ANGLE1 and proceeds in the direction of
decreasing angles to end at ANGLE2. If ANGLE2 is greater than ANGLE1 it
will be progressively decreased by 2*M_PI until it is less than ANGLE1.
See `cairo-arc' for more details. This function differs only in the
direction of the arc between the two angles.
cr
a cairo context
xc
X position of the center of the arc
yc
Y position of the center of the arc
radius
the radius of the arc
angle1
the start angle, in radians
angle2
the end angle, in radians
This documentation was automatically generated.
cairo-curve-to
- Function: cairo-curve-to (CR `<cairo-t>')(X1 `<double>')(Y1 `<double>')(X2
`<double>')(Y2 `<double>')(X3 `<double>')(Y3 `<double>')
Adds a cubic Bézier spline to the path from the current point to position
(X3, Y3) in user-space coordinates, using (X1, Y1) and (X2, Y2) as the
control points. After this call the current point will be (X3, Y3).
If there is no current point before the call to `cairo-curve-to' this
function will behave as if preceded by a call to cairo_move_to (CR, X1,
Y1).
cr
a cairo context
x1
the X coordinate of the first control point
y1
the Y coordinate of the first control point
x2
the X coordinate of the second control point
y2
the Y coordinate of the second control point
x3
the X coordinate of the end of the curve
y3
the Y coordinate of the end of the curve
This documentation was automatically generated.
cairo-line-to
- Function: cairo-line-to (CR `<cairo-t>')(X `<double>')(Y `<double>')
Adds a line to the path from the current point to position (X, Y) in
user-space coordinates. After this call the current point will be (X, Y).
If there is no current point before the call to `cairo-line-to' this
function will behave as cairo_move_to (CR, X, Y).
cr
a cairo context
x
the X coordinate of the end of the new line
y
the Y coordinate of the end of the new line
This documentation was automatically generated.
cairo-move-to
- Function: cairo-move-to (CR `<cairo-t>')(X `<double>')(Y `<double>')
Begin a new sub-path. After this call the current point will be (X, Y).
cr
a cairo context
x
the X coordinate of the new position
y
the Y coordinate of the new position
This documentation was automatically generated.
cairo-rectangle
- Function: cairo-rectangle (CR `<cairo-t>')(X `<double>')(Y `<double>')(WIDTH
`<double>')(HEIGHT `<double>')
Adds a closed sub-path rectangle of the given size to the current path at
position (X, Y) in user-space coordinates.
This function is logically equivalent to:
cairo_move_to (cr, x, y);
cairo_rel_line_to (cr, width, 0);
cairo_rel_line_to (cr, 0, height);
cairo_rel_line_to (cr, -width, 0);
cairo_close_path (cr);
cr
a cairo context
x
the X coordinate of the top left corner of the rectangle
y
the Y coordinate to the top left corner of the rectangle
width
the width of the rectangle
height
the height of the rectangle
This documentation was automatically generated.
cairo-glyph-path
- Function: cairo-glyph-path (CR `<cairo-t>')(GLYPHS
`<cairo-glyph-t>')(NUM-GLYPHS `<int>')
Adds closed paths for the glyphs to the current path. The generated path if
filled, achieves an effect similar to that of `cairo-show-glyphs'.
cr
a cairo context
glyphs
array of glyphs to show
num-glyphs
number of glyphs to show
This documentation was automatically generated.
cairo-text-path
- Function: cairo-text-path (CR `<cairo-t>')(UTF8 `<char>')
Adds closed paths for text to the current path. The generated path if
filled, achieves an effect similar to that of `cairo-show-text'.
Text conversion and positioning is done similar to `cairo-show-text'.
Like `cairo-show-text', After this call the current point is moved to the
origin of where the next glyph would be placed in this same progression.
That is, the current point will be at the origin of the final glyph offset
by its advance values. This allows for chaining multiple calls to to
`cairo-text-path' without having to set current point in between.
NOTE: The `cairo-text-path' function call is part of what the cairo
designers call the "toy" text API. It is convenient for short demos and
simple programs, but it is not expected to be adequate for serious
text-using applications. See `cairo-glyph-path' for the "real" text path
API in cairo.
cr
a cairo context
utf8
a string of text encoded in UTF-8
This documentation was automatically generated.
cairo-rel-curve-to
- Function: cairo-rel-curve-to (CR `<cairo-t>')(DX1 `<double>')(DY1
`<double>')(DX2 `<double>')(DY2 `<double>')(DX3 `<double>')(DY3 `<double>')
Relative-coordinate version of `cairo-curve-to'. All offsets are relative
to the current point. Adds a cubic Bézier spline to the path from the
current point to a point offset from the current point by (DX3, DY3), using
points offset by (DX1, DY1) and (DX2, DY2) as the control points. After
this call the current point will be offset by (DX3, DY3).
Given a current point of (x, y), cairo_rel_curve_to (CR, DX1, DY1, DX2,
DY2, DX3, DY3) is logically equivalent to cairo_curve_to (CR, x + DX1, y +
DY1, x + DX2, y + DY2, x + DX3, y + DY3).
It is an error to call this function with no current point. Doing so will
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT.
cr
a cairo context
dx1
the X offset to the first control point
dy1
the Y offset to the first control point
dx2
the X offset to the second control point
dy2
the Y offset to the second control point
dx3
the X offset to the end of the curve
dy3
the Y offset to the end of the curve
This documentation was automatically generated.
cairo-rel-line-to
- Function: cairo-rel-line-to (CR `<cairo-t>')(DX `<double>')(DY `<double>')
Relative-coordinate version of `cairo-line-to'. Adds a line to the path
from the current point to a point that is offset from the current point by
(DX, DY) in user space. After this call the current point will be offset by
(DX, DY).
Given a current point of (x, y), cairo_rel_line_to(CR, DX, DY) is logically
equivalent to cairo_line_to (CR, x + DX, y + DY).
It is an error to call this function with no current point. Doing so will
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT.
cr
a cairo context
dx
the X offset to the end of the new line
dy
the Y offset to the end of the new line
This documentation was automatically generated.
cairo-rel-move-to
- Function: cairo-rel-move-to (CR `<cairo-t>')(DX `<double>')(DY `<double>')
Begin a new sub-path. After this call the current point will offset by (X,
Y).
Given a current point of (x, y), cairo_rel_move_to(CR, DX, DY) is logically
equivalent to cairo_move_to (CR, x + DX, y + DY).
It is an error to call this function with no current point. Doing so will
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT.
cr
a cairo context
dx
the X offset
dy
the Y offset
This documentation was automatically generated.
cairo-pattern-add-color-stop-rgb
- Function: cairo-pattern-add-color-stop-rgb (PATTERN
`<cairo-pattern-t>')(OFFSET `<double>')(RED `<double>')(GREEN `<double>')(BLUE
`<double>')
Adds an opaque color stop to a gradient pattern. The offset specifies the
location along the gradient's control vector. For example, a linear
gradient's control vector is from (x0,y0) to (x1,y1) while a radial
gradient's control vector is from any point on the start circle to the
corresponding point on the end circle.
The color is specified in the same way as in `cairo-set-source-rgb'.
Note: If the pattern is not a gradient pattern, (eg. a linear or radial
pattern), then the pattern will be put into an error status with a status
of `CAIRO_STATUS_PATTERN_TYPE_MISMATCH'.
pattern
a `<cairo-pattern-t>'
offset
an offset in the range [0.0 .. 1.0]
red
red component of color
green
green component of color
blue
blue component of color
This documentation was automatically generated.
cairo-pattern-add-color-stop-rgba
- Function: cairo-pattern-add-color-stop-rgba (PATTERN
`<cairo-pattern-t>')(OFFSET `<double>')(RED `<double>')(GREEN `<double>')(BLUE
`<double>')(ALPHA `<double>')
Adds a translucent color stop to a gradient pattern. The offset specifies
the location along the gradient's control vector. For example, a linear
gradient's control vector is from (x0,y0) to (x1,y1) while a radial
gradient's control vector is from any point on the start circle to the
corresponding point on the end circle.
The color is specified in the same way as in `cairo-set-source-rgba'.
Note: If the pattern is not a gradient pattern, (eg. a linear or radial
pattern), then the pattern will be put into an error status with a status
of `CAIRO_STATUS_PATTERN_TYPE_MISMATCH'.
pattern
a `<cairo-pattern-t>'
offset
an offset in the range [0.0 .. 1.0]
red
red component of color
green
green component of color
blue
blue component of color
alpha
alpha component of color
This documentation was automatically generated.
cairo-pattern-get-color-stop-rgba
- Function: cairo-pattern-get-color-stop-rgba (PATTERN
`<cairo-pattern-t>')(INDEX `<int>') ==>(RET `<cairo-status-t>')(OFFSET
`<double>')(RED `<double>')(GREEN `<double>')(BLUE `<double>')(ALPHA `<double>')
Gets the color and offset information at the given INDEX for a gradient
pattern. Values of INDEX are 0 to 1 less than the number returned by
`cairo-pattern-get-color-stop-count'.
pattern
a `<cairo-pattern-t>'
index
index of the stop to return data for
offset
return value for the offset of the stop, or ``#f''
red
return value for red component of color, or ``#f''
green
return value for green component of color, or ``#f''
blue
return value for blue component of color, or ``#f''
alpha
return value for alpha component of color, or ``#f''
ret
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_INVALID_INDEX' if INDEX is
not valid for the given pattern. If the pattern is not a gradient
pattern, `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' is returned.
Since 1.4
This documentation was automatically generated.
cairo-pattern-create-rgb
- Function: cairo-pattern-create-rgb (RED `<double>')(GREEN `<double>')(BLUE
`<double>') ==>(RET `<cairo-pattern-t>')
Creates a new cairo_pattern_t corresponding to an opaque color. 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.
red
red component of the color
green
green component of the color
blue
blue component of the color
ret
the newly created `<cairo-pattern-t>' if successful, or an error
pattern in case of no memory. The caller owns the returned object and
should call `cairo-pattern-destroy' when finished with it. This
function will always return a valid pointer, but if an error occurred
the pattern status will be set to an error. To inspect the status of a
pattern use `cairo-pattern-status'.
This documentation was automatically generated.
cairo-pattern-create-rgba
- Function: cairo-pattern-create-rgba (RED `<double>')(GREEN `<double>')(BLUE
`<double>')(ALPHA `<double>') ==>(RET `<cairo-pattern-t>')
Creates a new cairo_pattern_t corresponding to a translucent color. 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.
red
red component of the color
green
green component of the color
blue
blue component of the color
alpha
alpha component of the color
ret
the newly created `<cairo-pattern-t>' if successful, or an error
pattern in case of no memory. The caller owns the returned object and
should call `cairo-pattern-destroy' when finished with it. This
function will always return a valid pointer, but if an error occurred
the pattern status will be set to an error. To inspect the status of a
pattern use `cairo-pattern-status'.
This documentation was automatically generated.
cairo-pattern-get-rgba
- Function: cairo-pattern-get-rgba (PATTERN `<cairo-pattern-t>') ==>(RET
`<cairo-status-t>')(RED `<double>')(GREEN `<double>')(BLUE `<double>')(ALPHA
`<double>')
Gets the solid color for a solid color pattern.
pattern
a `<cairo-pattern-t>'
red
return value for red component of color, or ``#f''
green
return value for green component of color, or ``#f''
blue
return value for blue component of color, or ``#f''
alpha
return value for alpha component of color, or ``#f''
ret
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if the
pattern is not a solid color pattern.
Since 1.4
This documentation was automatically generated.
cairo-pattern-create-for-surface
- Function: cairo-pattern-create-for-surface (SURFACE `<cairo-surface-t>')
==>(RET `<cairo-pattern-t>')
Create a new cairo_pattern_t for the given surface.
surface
the surface
ret
the newly created `<cairo-pattern-t>' if successful, or an error
pattern in case of no memory. The caller owns the returned object and
should call `cairo-pattern-destroy' when finished with it. This
function will always return a valid pointer, but if an error occurred
the pattern status will be set to an error. To inspect the status of a
pattern use `cairo-pattern-status'.
This documentation was automatically generated.
cairo-pattern-get-surface
- Function: cairo-pattern-get-surface (PATTERN `<cairo-pattern-t>') ==>(RET
`<cairo-status-t>')(SURFACE `<cairo-surface-t*>')
Gets the surface of a surface pattern. The reference returned in SURFACE is
owned by the pattern; the caller should call `cairo-surface-reference' if
the surface is to be retained.
pattern
a `<cairo-pattern-t>'
surface
return value for surface of pattern, or ``#f''
ret
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if the
pattern is not a surface pattern.
Since 1.4
This documentation was automatically generated.
cairo-pattern-create-linear
- Function: cairo-pattern-create-linear (X0 `<double>')(Y0 `<double>')(X1
`<double>')(Y1 `<double>') ==>(RET `<cairo-pattern-t>')
Create a new linear gradient cairo_pattern_t along the line defined by (x0,
y0) and (x1, y1). Before using the gradient pattern, a number of color
stops should be defined using `cairo-pattern-add-color-stop-rgb' or
`cairo-pattern-add-color-stop-rgba'.
Note: The coordinates here are in pattern space. For a new pattern, pattern
space is identical to user space, but the relationship between the spaces
can be changed with `cairo-pattern-set-matrix'.
x0
x coordinate of the start point
y0
y coordinate of the start point
x1
x coordinate of the end point
y1
y coordinate of the end point
ret
the newly created `<cairo-pattern-t>' if successful, or an error
pattern in case of no memory. The caller owns the returned object and
should call `cairo-pattern-destroy' when finished with it. This
function will always return a valid pointer, but if an error occurred
the pattern status will be set to an error. To inspect the status of a
pattern use `cairo-pattern-status'.
This documentation was automatically generated.
cairo-pattern-get-linear-points
- Function: cairo-pattern-get-linear-points (PATTERN `<cairo-pattern-t>')
==>(RET `<cairo-status-t>')(X0 `<double>')(Y0 `<double>')(X1 `<double>')(Y1
`<double>')
Gets the gradient endpoints for a linear gradient.
pattern
a `<cairo-pattern-t>'
x0
return value for the x coordinate of the first point, or ``#f''
y0
return value for the y coordinate of the first point, or ``#f''
x1
return value for the x coordinate of the second point, or ``#f''
y1
return value for the y coordinate of the second point, or ``#f''
ret
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if
PATTERN is not a linear gradient pattern.
Since 1.4
This documentation was automatically generated.
cairo-pattern-create-radial
- Function: cairo-pattern-create-radial (CX0 `<double>')(CY0 `<double>')(RADIUS0
`<double>')(CX1 `<double>')(CY1 `<double>')(RADIUS1 `<double>') ==>(RET
`<cairo-pattern-t>')
Creates a new radial gradient cairo_pattern_t between the two circles
defined by (x0, y0, c0) and (x1, y1, c0). Before using the gradient
pattern, a number of color stops should be defined using
`cairo-pattern-add-color-stop-rgb' or `cairo-pattern-add-color-stop-rgba'.
Note: The coordinates here are in pattern space. For a new pattern, pattern
space is identical to user space, but the relationship between the spaces
can be changed with `cairo-pattern-set-matrix'.
cx0
x coordinate for the center of the start circle
cy0
y coordinate for the center of the start circle
radius0
radius of the start circle
cx1
x coordinate for the center of the end circle
cy1
y coordinate for the center of the end circle
radius1
radius of the end circle
ret
the newly created `<cairo-pattern-t>' if successful, or an error
pattern in case of no memory. The caller owns the returned object and
should call `cairo-pattern-destroy' when finished with it. This
function will always return a valid pointer, but if an error occurred
the pattern status will be set to an error. To inspect the status of a
pattern use `cairo-pattern-status'.
This documentation was automatically generated.
cairo-pattern-get-radial-circles
- Function: cairo-pattern-get-radial-circles (PATTERN `<cairo-pattern-t>')
==>(RET `<cairo-status-t>')(X0 `<double>')(Y0 `<double>')(R0 `<double>')(X1
`<double>')(Y1 `<double>')(R1 `<double>')
Gets the gradient endpoint circles for a radial gradient, each specified as
a center coordinate and a radius.
pattern
a `<cairo-pattern-t>'
x0
return value for the x coordinate of the center of the first circle,
or ``#f''
y0
return value for the y coordinate of the center of the first circle,
or ``#f''
r0
return value for the radius of the first circle, or ``#f''
x1
return value for the x coordinate of the center of the second circle,
or ``#f''
y1
return value for the y coordinate of the center of the second circle,
or ``#f''
r1
return value for the radius of the second circle, or ``#f''
ret
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if
PATTERN is not a radial gradient pattern.
Since 1.4
This documentation was automatically generated.
cairo-pattern-set-extend
- Function: cairo-pattern-set-extend (PATTERN `<cairo-pattern-t>')(EXTEND
`<cairo-extend-t>')
Sets the mode to be used for drawing outside the area of a pattern. See
`<cairo-extend-t>' for details on the semantics of each extend strategy.
pattern
a `<cairo-pattern-t>'
extend
a `<cairo-extend-t>' describing how the area outside of the pattern
will be drawn
This documentation was automatically generated.
cairo-pattern-get-extend
- Function: cairo-pattern-get-extend (PATTERN `<cairo-pattern-t>') ==>(RET
`<cairo-extend-t>')
Gets the current extend mode for a pattern. See `<cairo-extend-t>' for
details on the semantics of each extend strategy.
pattern
a `<cairo-pattern-t>'
ret
the current extend strategy used for drawing the pattern.
This documentation was automatically generated.
cairo-pattern-set-filter
- Function: cairo-pattern-set-filter (PATTERN `<cairo-pattern-t>')(FILTER
`<cairo-filter-t>')
Sets the filter to be used for resizing when using this pattern. See
`<cairo-filter-t>' for details on each filter.
pattern
a `<cairo-pattern-t>'
filter
a `<cairo-filter-t>' describing the filter to use for resizing the
pattern
This documentation was automatically generated.
cairo-pattern-get-filter
- Function: cairo-pattern-get-filter (PATTERN `<cairo-pattern-t>') ==>(RET
`<cairo-filter-t>')
Gets the current filter for a pattern. See `<cairo-filter-t>' for details
on each filter.
pattern
a `<cairo-pattern-t>'
ret
the current filter used for resizing the pattern.
This documentation was automatically generated.
cairo-pattern-set-matrix
- Function: cairo-pattern-set-matrix (PATTERN `<cairo-pattern-t>')(MATRIX
`<cairo-matrix-t>')
Sets the pattern's transformation matrix to MATRIX. This matrix is a
transformation from user space to pattern space.
When a pattern is first created it always has the identity matrix for its
transformation matrix, which means that pattern space is initially
identical to user space.
Important: Please note that the direction of this transformation matrix is
from user space to pattern space. This means that if you imagine the flow
from a pattern to user space (and on to device space), then coordinates in
that flow will be transformed by the inverse of the pattern matrix.
For example, if you want to make a pattern appear twice as large as it does
by default the correct code to use is:
cairo_matrix_init_scale (&matrix, 0.5, 0.5);
cairo_pattern_set_matrix (pattern, &matrix);
Meanwhile, using values of 2.0 rather than 0.5 in the code above would
cause the pattern to appear at half of its default size.
Also, please note the discussion of the user-space locking semantics of
`cairo-set-source'.
pattern
a `<cairo-pattern-t>'
matrix
a `<cairo-matrix-t>'
This documentation was automatically generated.
cairo-pattern-get-matrix
- Function: cairo-pattern-get-matrix (PATTERN `<cairo-pattern-t>')(MATRIX
`<cairo-matrix-t>')
Stores the pattern's transformation matrix into MATRIX.
pattern
a `<cairo-pattern-t>'
matrix
return value for the matrix
This documentation was automatically generated.
cairo-pattern-get-type
- Function: cairo-pattern-get-type (PATTERN `<cairo-pattern-t>') ==>(RET
`<cairo-pattern-type-t>')
This function returns the type a pattern. See `<cairo-pattern-type-t>' for
available types.
pattern
a `<cairo-pattern-t>'
ret
The type of PATTERN.
Since 1.2
This documentation was automatically generated.
cairo-pdf-surface-create
- Function: cairo-pdf-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>')
Creates a PDF surface of the specified size in points to be written to
FILENAME.
filename
a filename for the PDF output (must be writable)
width-in-points
width of the surface, in points (1 point == 1/72.0 inch)
height-in-points
height of the surface, in points (1 point == 1/72.0 inch)
ret
a pointer to the newly created surface. The caller owns the surface
and should call cairo_surface_destroy when done with it. This function
always returns a valid pointer, but it will return a pointer to a
"nil" surface if an error such as out of memory occurs. You can use
`cairo-surface-status' to check for this.
Since 1.2
This documentation was automatically generated.
cairo-pdf-surface-set-size
- Function: cairo-pdf-surface-set-size (SURFACE
`<cairo-surface-t>')(WIDTH-IN-POINTS `<double>')(HEIGHT-IN-POINTS `<double>')
Changes the size of a PDF surface for the current (and subsequent) pages.
This function should only be called before any drawing operations have been
performed on the current page. The simplest way to do this is to call this
function immediately after creating the surface or immediately after
completing a page with either `cairo-show-page' or `cairo-copy-page'.
surface
a PDF cairo_surface_t
width-in-points
new surface width, in points (1 point == 1/72.0 inch)
height-in-points
new surface height, in points (1 point == 1/72.0 inch)
Since 1.2
This documentation was automatically generated.
cairo-image-surface-create-from-png
- Function: cairo-image-surface-create-from-png (FILENAME `<char>') ==>(RET
`<cairo-surface-t>')
Creates a new image surface and initializes the contents to the given PNG
file.
filename
name of PNG file to load
ret
a new `<cairo-surface-t>' initialized with the contents of the PNG
file, or a "nil" surface if any error occurred. A nil surface can be
checked for with cairo_surface_status(surface) which may return one of
the following values: CAIRO_STATUS_NO_MEMORY
CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR
This documentation was automatically generated.
cairo-surface-write-to-png
- Function: cairo-surface-write-to-png (SURFACE `<cairo-surface-t>')(FILENAME
`<char>') ==>(RET `<cairo-status-t>')
Writes the contents of SURFACE to a new file FILENAME as a PNG image.
surface
a `<cairo-surface-t>' with pixel contents
filename
the name of a file to write to
ret
CAIRO_STATUS_SUCCESS if the PNG file was written successfully.
Otherwise, CAIRO_STATUS_NO_MEMORY if memory could not be allocated for
the operation or CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface
does not have pixel contents, or CAIRO_STATUS_WRITE_ERROR if an I/O
error occurs while attempting to write the file.
This documentation was automatically generated.
cairo-ps-surface-create
- Function: cairo-ps-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>')
Creates a PostScript surface of the specified size in points to be written
to FILENAME. See `cairo-ps-surface-create-for-stream' for a more flexible
mechanism for handling the PostScript output than simply writing it to a
named file.
Note that the size of individual pages of the PostScript output can vary.
See `cairo-ps-surface-set-size'.
filename
a filename for the PS output (must be writable)
width-in-points
width of the surface, in points (1 point == 1/72.0 inch)
height-in-points
height of the surface, in points (1 point == 1/72.0 inch)
ret
a pointer to the newly created surface. The caller owns the surface
and should call cairo_surface_destroy when done with it. This function
always returns a valid pointer, but it will return a pointer to a
"nil" surface if an error such as out of memory occurs. You can use
`cairo-surface-status' to check for this.
Since 1.2
This documentation was automatically generated.
cairo-ps-surface-set-size
- Function: cairo-ps-surface-set-size (SURFACE
`<cairo-surface-t>')(WIDTH-IN-POINTS `<double>')(HEIGHT-IN-POINTS `<double>')
Changes the size of a PostScript surface for the current (and subsequent)
pages.
This function should only be called before any drawing operations have been
performed on the current page. The simplest way to do this is to call this
function immediately after creating the surface or immediately after
completing a page with either `cairo-show-page' or `cairo-copy-page'.
surface
a PostScript cairo_surface_t
width-in-points
new surface width, in points (1 point == 1/72.0 inch)
height-in-points
new surface height, in points (1 point == 1/72.0 inch)
Since 1.2
This documentation was automatically generated.
cairo-ps-surface-dsc-comment
- Function: cairo-ps-surface-dsc-comment (SURFACE `<cairo-surface-t>')(COMMENT
`<char>')
Emit a comment into the PostScript output for the given surface.
The comment is expected to conform to the PostScript Language Document
Structuring Conventions (DSC). Please see that manual for details on the
available comments and their meanings. In particular, the %`IncludeFeature'
comment allows a device-independent means of controlling printer device
features. So the PostScript Printer Description Files Specification will
also be a useful reference.
The comment string must begin with a percent character (%) and the total
length of the string (including any initial percent characters) must not
exceed 255 characters. Violating either of these conditions will place
SURFACE into an error state. But beyond these two conditions, this function
will not enforce conformance of the comment with any particular
specification.
The comment string should not have a trailing newline.
The DSC specifies different sections in which particular comments can
appear. This function provides for comments to be emitted within three
sections: the header, the Setup section, and the PageSetup section.
Comments appearing in the first two sections apply to the entire document
while comments in the BeginPageSetup section apply only to a single page.
For comments to appear in the header section, this function should be
called after the surface is created, but before a call to
`cairo-ps-surface-begin-setup'.
For comments to appear in the Setup section, this function should be called
after a call to `cairo-ps-surface-begin-setup' but before a call to
`cairo-ps-surface-begin-page-setup'.
For comments to appear in the PageSetup section, this function should be
called after a call to `cairo-ps-surface-begin-page-setup'.
Note that it is only necessary to call `cairo-ps-surface-begin-page-setup'
for the first page of any surface. After a call to `cairo-show-page' or
`cairo-copy-page' comments are unambiguously directed to the PageSetup
section of the current page. But it doesn't hurt to call this function at
the beginning of every page as that consistency may make the calling code
simpler.
As a final note, cairo automatically generates several comments on its own.
As such, applications must not manually generate any of the following
comments:
Header section: %!PS-Adobe-3.0, %`Creator', %`CreationDate', %`Pages',
%`BoundingBox', %`DocumentData', %`LanguageLevel', %`EndComments'.
Setup section: %`BeginSetup', %`EndSetup'
PageSetup section: %`BeginPageSetup', %`PageBoundingBox', %`EndPageSetup'.
Other sections: %`BeginProlog', %`EndProlog', %`Page', %`Trailer', %`EOF'
Here is an example sequence showing how this function might be used:
cairo_surface_t *surface = cairo_ps_surface_create (filename, width, height);
...
cairo_ps_surface_dsc_comment (surface, "%%Title: My excellent document");
cairo_ps_surface_dsc_comment (surface, "%%Copyright: Copyright (C) 2006 Cairo Lover")
...
cairo_ps_surface_dsc_begin_setup (surface);
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor White");
...
cairo_ps_surface_dsc_begin_page_setup (surface);
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A3");
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *InputSlot LargeCapacity");
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaType Glossy");
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor Blue");
... draw to first page here ..
cairo_show_page (cr);
...
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A5");
...
surface
a PostScript cairo_surface_t
comment
a comment string to be emitted into the PostScript output
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-create
- Function: cairo-scaled-font-create (FONT-FACE
`<cairo-font-face-t>')(FONT-MATRIX `<cairo-matrix-t>')(CTM
`<cairo-matrix-t>')(OPTIONS `<cairo-font-options-t>') ==>(RET
`<cairo-scaled-font-t>')
Creates a `<cairo-scaled-font-t>' object from a font face and matrices that
describe the size of the font and the environment in which it will be used.
font-face
a `<cairo-font-face-t>'
font-matrix
font space to user space transformation matrix for the font. In the
simplest case of a N point font, this matrix is just a scale by N, but
it can also be used to shear the font or stretch it unequally along
the two axes. See `cairo-set-font-matrix'.
ctm
user to device transformation matrix with which the font will be used.
options
options to use when getting metrics for the font and rendering with
it.
ret
a newly created `<cairo-scaled-font-t>'. Destroy with
`cairo-scaled-font-destroy'
This documentation was automatically generated.
cairo-scaled-font-extents
- Function: cairo-scaled-font-extents (SCALED-FONT
`<cairo-scaled-font-t>')(EXTENTS `<cairo-font-extents-t>')
Gets the metrics for a `<cairo-scaled-font-t>'.
scaled-font
a `<cairo-scaled-font-t>'
extents
a `<cairo-font-extents-t>' which to store the retrieved extents.
This documentation was automatically generated.
cairo-scaled-font-text-extents
- Function: cairo-scaled-font-text-extents (SCALED-FONT
`<cairo-scaled-font-t>')(UTF8 `<char>')(EXTENTS `<cairo-text-extents-t>')
Gets the extents for a string of text. The extents describe a user-space
rectangle that encloses the "inked" portion of the text drawn at the origin
(0,0) (as it would be drawn by `cairo-show-text' if the cairo graphics
state were set to the same font_face, font_matrix, ctm, and font_options as
SCALED-FONT). Additionally, the x_advance and y_advance values indicate the
amount by which the current point would be advanced by `cairo-show-text'.
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.
scaled-font
a `<cairo-scaled-font-t>'
utf8
a string of text, encoded in UTF-8
extents
a `<cairo-text-extents-t>' which to store the retrieved extents.
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-glyph-extents
- Function: cairo-scaled-font-glyph-extents (SCALED-FONT
`<cairo-scaled-font-t>')(GLYPHS `<cairo-glyph-t>')(NUM-GLYPHS `<int>')(EXTENTS
`<cairo-text-extents-t>')
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' if the cairo graphics state were set to the
same font_face, font_matrix, ctm, and font_options as SCALED-FONT).
Additionally, the x_advance and y_advance values indicate the amount by
which the current point would be advanced by cairo_show_glyphs.
Note that whitespace glyphs do not contribute to the size of the rectangle
(extents.width and extents.height).
scaled-font
a `<cairo-scaled-font-t>'
glyphs
an array of glyph IDs with X and Y offsets.
num-glyphs
the number of glyphs in the GLYPHS array
extents
a `<cairo-text-extents-t>' which to store the retrieved extents.
This documentation was automatically generated.
cairo-scaled-font-get-font-face
- Function: cairo-scaled-font-get-font-face (SCALED-FONT
`<cairo-scaled-font-t>') ==>(RET `<cairo-font-face-t>')
Gets the font face that this scaled font was created for.
scaled-font
a `<cairo-scaled-font-t>'
ret
The `<cairo-font-face-t>' with which SCALED-FONT was created.
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-get-font-options
- Function: cairo-scaled-font-get-font-options (SCALED-FONT
`<cairo-scaled-font-t>')(OPTIONS `<cairo-font-options-t>')
Stores the font options with which SCALED-FONT was created into OPTIONS.
scaled-font
a `<cairo-scaled-font-t>'
options
return value for the font options
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-get-font-matrix
- Function: cairo-scaled-font-get-font-matrix (SCALED-FONT
`<cairo-scaled-font-t>')(FONT-MATRIX `<cairo-matrix-t>')
Stores the font matrix with which SCALED-FONT was created into MATRIX.
scaled-font
a `<cairo-scaled-font-t>'
font-matrix
return value for the matrix
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-get-ctm
- Function: cairo-scaled-font-get-ctm (SCALED-FONT `<cairo-scaled-font-t>')(CTM
`<cairo-matrix-t>')
Stores the CTM with which SCALED-FONT was created into CTM.
scaled-font
a `<cairo-scaled-font-t>'
ctm
return value for the CTM
Since 1.2
This documentation was automatically generated.
cairo-scaled-font-get-type
- Function: cairo-scaled-font-get-type (SCALED-FONT `<cairo-scaled-font-t>')
==>(RET `<cairo-font-type-t>')
This function returns the type of the backend used to create a scaled font.
See `<cairo-font-type-t>' for available types.
scaled-font
a `<cairo-scaled-font-t>'
ret
The type of SCALED-FONT.
Since 1.2
This documentation was automatically generated.
cairo-surface-create-similar
- Function: cairo-surface-create-similar (OTHER `<cairo-surface-t>')(CONTENT
`<cairo-content-t>')(WIDTH `<int>')(HEIGHT `<int>') ==>(RET `<cairo-surface-t>')
Create a new surface that is as compatible as possible with an existing
surface. For example the new surface will have the same fallback resolution
and font options as OTHER. Generally, the new surface will also use the
same backend as OTHER, unless that is not possible for some reason. The
type of the returned surface may be examined with `cairo-surface-get-type'.
Initially the surface contents are all 0 (transparent if contents have
transparency, black otherwise.)
other
an existing surface used to select the backend of the new surface
content
the content for the new surface
width
width of the new surface, (in device-space units)
height
height of the new surface (in device-space units)
ret
a pointer to the newly allocated surface. The caller owns the surface
and should call cairo_surface_destroy when done with it. This function
always returns a valid pointer, but it will return a pointer to a
"nil" surface if OTHER is already in an error state or any other error
occurs.
This documentation was automatically generated.
cairo-surface-finish
- Function: cairo-surface-finish (SURFACE `<cairo-surface-t>')
This function finishes the surface and drops all references to external
resources. For example, for the Xlib backend it means that cairo will no
longer access the drawable, which can be freed. After calling
`cairo-surface-finish' the only valid operations on a surface are getting
and setting user data and referencing and destroying it. Further drawing to
the surface will not affect the surface but will instead trigger a
CAIRO_STATUS_SURFACE_FINISHED error.
When the last call to `cairo-surface-destroy' decreases the reference count
to zero, cairo will call `cairo-surface-finish' if it hasn't been called
already, before freeing the resources associated with the surface.
surface
the `<cairo-surface-t>' to finish
This documentation was automatically generated.
cairo-surface-flush
- Function: cairo-surface-flush (SURFACE `<cairo-surface-t>')
Do any pending drawing for the surface and also restore any temporary
modification's cairo has made to the surface's state. This function must be
called before switching from drawing on the surface with cairo to drawing
on it directly with native APIs. If the surface doesn't support direct
access, then this function does nothing.
surface
a `<cairo-surface-t>'
This documentation was automatically generated.
cairo-surface-get-font-options
- Function: cairo-surface-get-font-options (SURFACE `<cairo-surface-t>')(OPTIONS
`<cairo-font-options-t>')
Retrieves the default font rendering options for the surface. This allows
display surfaces to report the correct subpixel order for rendering on
them, print surfaces to disable hinting of metrics and so forth. The result
can then be used with `cairo-scaled-font-create'.
surface
a `<cairo-surface-t>'
options
a `<cairo-font-options-t>' object into which to store the retrieved
options. All existing values are overwritten
This documentation was automatically generated.
cairo-surface-get-content
- Function: cairo-surface-get-content (SURFACE `<cairo-surface-t>') ==>(RET
`<cairo-content-t>')
This function returns the content type of SURFACE which indicates whether
the surface contains color and/or alpha information. See
`<cairo-content-t>'.
surface
a `<cairo-surface-t>'
ret
The content type of SURFACE.
Since 1.2
This documentation was automatically generated.
cairo-surface-mark-dirty
- Function: cairo-surface-mark-dirty (SURFACE `<cairo-surface-t>')
Tells cairo that drawing has been done to surface using means other than
cairo, and that cairo should reread any cached areas. Note that you must
call `cairo-surface-flush' before doing such drawing.
surface
a `<cairo-surface-t>'
This documentation was automatically generated.
cairo-surface-mark-dirty-rectangle
- Function: cairo-surface-mark-dirty-rectangle (SURFACE `<cairo-surface-t>')(X
`<int>')(Y `<int>')(WIDTH `<int>')(HEIGHT `<int>')
Like `cairo-surface-mark-dirty', but drawing has been done only to the
specified rectangle, so that cairo can retain cached contents for other
parts of the surface.
Any cached clip set on the surface will be reset by this function, to make
sure that future cairo calls have the clip set that they expect.
surface
a `<cairo-surface-t>'
x
X coordinate of dirty rectangle
y
Y coordinate of dirty rectangle
width
width of dirty rectangle
height
height of dirty rectangle
This documentation was automatically generated.
cairo-surface-set-device-offset
- Function: cairo-surface-set-device-offset (SURFACE
`<cairo-surface-t>')(X-OFFSET `<double>')(Y-OFFSET `<double>')
Sets an offset that is added to the device coordinates determined by the
CTM when drawing to SURFACE. One use case for this function is when we want
to create a `<cairo-surface-t>' that redirects drawing for a portion of an
onscreen surface to an offscreen surface in a way that is completely
invisible to the user of the cairo API. Setting a transformation via
`cairo-translate' isn't sufficient to do this, since functions like
`cairo-device-to-user' will expose the hidden offset.
Note that the offset affects drawing to the surface as well as using the
surface in a source pattern.
surface
a `<cairo-surface-t>'
x-offset
the offset in the X direction, in device units
y-offset
the offset in the Y direction, in device units
This documentation was automatically generated.
cairo-surface-get-device-offset
- Function: cairo-surface-get-device-offset (SURFACE `<cairo-surface-t>')
==>(X-OFFSET `<double>')(Y-OFFSET `<double>')
This function returns the previous device offset set by
`cairo-surface-set-device-offset'.
surface
a `<cairo-surface-t>'
x-offset
the offset in the X direction, in device units
y-offset
the offset in the Y direction, in device units
Since 1.2
This documentation was automatically generated.
cairo-surface-get-type
- Function: cairo-surface-get-type (SURFACE `<cairo-surface-t>') ==>(RET
`<cairo-surface-type-t>')
This function returns the type of the backend used to create a surface. See
`<cairo-surface-type-t>' for available types.
surface
a `<cairo-surface-t>'
ret
The type of SURFACE.
Since 1.2
This documentation was automatically generated.
cairo-svg-surface-create
- Function: cairo-svg-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>')
Creates a SVG surface of the specified size in points to be written to
FILENAME.
filename
a filename for the SVG output (must be writable)
width-in-points
width of the surface, in points (1 point == 1/72.0 inch)
height-in-points
height of the surface, in points (1 point == 1/72.0 inch)
ret
a pointer to the newly created surface. The caller owns the surface
and should call cairo_surface_destroy when done with it. This function
always returns a valid pointer, but it will return a pointer to a
"nil" surface if an error such as out of memory occurs. You can use
`cairo-surface-status' to check for this.
Since 1.2
This documentation was automatically generated.
cairo-select-font-face
- Function: cairo-select-font-face (CR `<cairo-t>')(FAMILY `<char>')(SLANT
`<cairo-font-slant-t>')(WEIGHT `<cairo-font-weight-t>')
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.
cr
a `<cairo-t>'
family
a font family name, encoded in UTF-8
slant
the slant for the font
weight
the weight for the font
This documentation was automatically generated.
cairo-set-font-size
- Function: cairo-set-font-size (CR `<cairo-t>')(SIZE `<double>')
Sets the current font matrix to a scale by a factor of SIZE, replacing any
font matrix previously set with `cairo-set-font-size' or
`cairo-set-font-matrix'. This results in a font size of SIZE user space
units. (More precisely, this matrix will result in the font's em-square
being a SIZE by SIZE square in user space.)
cr
a `<cairo-t>'
size
the new font size, in user space units
This documentation was automatically generated.
cairo-set-font-matrix
- Function: cairo-set-font-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>')
Sets the current font matrix to MATRIX. 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 `cairo-set-font-size'), but a more complex font matrix can be
used to shear the font or stretch it unequally along the two axes
cr
a `<cairo-t>'
matrix
a `<cairo-matrix-t>' describing a transform to be applied to the
current font.
This documentation was automatically generated.
cairo-get-font-matrix
- Function: cairo-get-font-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>')
Stores the current font matrix into MATRIX. See `cairo-set-font-matrix'.
cr
a `<cairo-t>'
matrix
return value for the matrix
This documentation was automatically generated.
cairo-set-font-options
- Function: cairo-set-font-options (CR `<cairo-t>')(OPTIONS
`<cairo-font-options-t>')
Sets a set of custom font rendering options for the `<cairo-t>'. Rendering
options are derived by merging these options with the options derived from
underlying surface; if the value in OPTIONS has a default value (like
`CAIRO_ANTIALIAS_DEFAULT'), then the value from the surface is used.
cr
a `<cairo-t>'
options
font options to use
This documentation was automatically generated.
cairo-get-font-options
- Function: cairo-get-font-options (CR `<cairo-t>')(OPTIONS
`<cairo-font-options-t>')
Retrieves font rendering options set via `<cairo-set-font-options>'. Note
that the returned options do not include any options derived from the
underlying surface; they are literally the options passed to
`cairo-set-font-options'.
cr
a `<cairo-t>'
options
a `<cairo-font-options-t>' object into which to store the retrieved
options. All existing values are overwritten
This documentation was automatically generated.
cairo-set-font-face
- Function: cairo-set-font-face (CR `<cairo-t>')(FONT-FACE
`<cairo-font-face-t>')
Replaces the current `<cairo-font-face-t>' object in the `<cairo-t>' with
FONT-FACE. The replaced font face in the `<cairo-t>' will be destroyed if
there are no other references to it.
cr
a `<cairo-t>'
font-face
a `<cairo-font-face-t>', or ``#f'' to restore to the default font
This documentation was automatically generated.
cairo-get-font-face
- Function: cairo-get-font-face (CR `<cairo-t>') ==>(RET `<cairo-font-face-t>')
Gets the current font face for a `<cairo-t>'.
cr
a `<cairo-t>'
ret
the current font face. This object is owned by cairo. To keep a
reference to it, you must call cairo_font_face_reference. This
function never returns ``#f''. If memory cannot be allocated, a
special "nil" `<cairo-font-face-t>' object will be returned on which
`cairo-font-face-status' returns `CAIRO_STATUS_NO_MEMORY'. Using this
nil object will cause its error state to propagate to other objects it
is passed to, (for example, calling `cairo-set-font-face' with a nil
font will trigger an error that will shutdown the cairo_t object).
This documentation was automatically generated.
cairo-set-scaled-font
- Function: cairo-set-scaled-font (CR `<cairo-t>')(SCALED-FONT
`<cairo-scaled-font-t>')
Replaces the current font face, font matrix, and font options in the
`<cairo-t>' with those of the `<cairo-scaled-font-t>'. Except for some
translation, the current CTM of the `<cairo-t>' should be the same as that
of the `<cairo-scaled-font-t>', which can be accessed using
`cairo-scaled-font-get-ctm'.
cr
a `<cairo-t>'
scaled-font
a `<cairo-scaled-font-t>'
Since 1.2
This documentation was automatically generated.
cairo-get-scaled-font
- Function: cairo-get-scaled-font (CR `<cairo-t>') ==>(RET
`<cairo-scaled-font-t>')
Gets the current scaled font for a `<cairo-t>'.
cr
a `<cairo-t>'
ret
the current scaled font. This object is owned by cairo. To keep a
reference to it, you must call `cairo-scaled-font-reference'. This
function never returns ``#f''. If memory cannot be allocated, a
special "nil" `<cairo-scaled-font-t>' object will be returned on which
`cairo-scaled-font-status' returns `CAIRO_STATUS_NO_MEMORY'. Using
this nil object will cause its error state to propagate to other
objects it is passed to, (for example, calling `cairo-set-scaled-font'
with a nil font will trigger an error that will shutdown the cairo_t
object).
Since 1.4
This documentation was automatically generated.
cairo-show-text
- Function: cairo-show-text (CR `<cairo-t>')(UTF8 `<char>')
A drawing operator that generates the shape from a string of UTF-8
characters, rendered according to the current font_face, font_size
(font_matrix), and font_options.
This function first computes a set of glyphs for the string of text. The
first glyph is placed so that its origin is at the current point. The
origin of each subsequent glyph is offset from that of the previous glyph
by the advance values of the previous glyph.
After this call the current point is moved to the origin of where the next
glyph would be placed in this same progression. That is, the current point
will be at the origin of the final glyph offset by its advance values. This
allows for easy display of a single logical string with multiple calls to
`cairo-show-text'.
NOTE: The `cairo-show-text' function call is part of what the cairo
designers call the "toy" text API. It is convenient for short demos and
simple programs, but it is not expected to be adequate for serious
text-using applications. See `cairo-show-glyphs' for the "real" text
display API in cairo.
cr
a cairo context
utf8
a string of text encoded in UTF-8
This documentation was automatically generated.
cairo-show-glyphs
- Function: cairo-show-glyphs (CR `<cairo-t>')(GLYPHS
`<cairo-glyph-t>')(NUM-GLYPHS `<int>')
A drawing operator that generates the shape from an array of glyphs,
rendered according to the current font_face, font_size (font_matrix), and
font_options.
cr
a cairo context
glyphs
array of glyphs to show
num-glyphs
number of glyphs to show
This documentation was automatically generated.
cairo-font-extents
- Function: cairo-font-extents (CR `<cairo-t>')(EXTENTS
`<cairo-font-extents-t>')
Gets the font extents for the currently selected font.
cr
a `<cairo-t>'
extents
a `<cairo-font-extents-t>' object into which the results will be
stored.
This documentation was automatically generated.
cairo-text-extents
- Function: cairo-text-extents (CR `<cairo-t>')(UTF8 `<char>')(EXTENTS
`<cairo-text-extents-t>')
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'.
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.
cr
a `<cairo-t>'
utf8
a string of text, encoded in UTF-8
extents
a `<cairo-text-extents-t>' object into which the results will be
stored
This documentation was automatically generated.
cairo-glyph-extents
- Function: cairo-glyph-extents (CR `<cairo-t>')(GLYPHS
`<cairo-glyph-t>')(NUM-GLYPHS `<int>')(EXTENTS `<cairo-text-extents-t>')
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.
Note that whitespace glyphs do not contribute to the size of the rectangle
(extents.width and extents.height).
cr
a `<cairo-t>'
glyphs
an array of `<cairo-glyph-t>' objects
num-glyphs
the number of elements in GLYPHS
extents
a `<cairo-text-extents-t>' object into which the results will be
stored
This documentation was automatically generated.
cairo-translate
- Function: cairo-translate (CR `<cairo-t>')(TX `<double>')(TY `<double>')
Modifies the current transformation matrix (CTM) by translating the
user-space origin by (TX, TY). 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.
cr
a cairo context
tx
amount to translate in the X direction
ty
amount to translate in the Y direction
This documentation was automatically generated.
cairo-scale
- Function: cairo-scale (CR `<cairo-t>')(SX `<double>')(SY `<double>')
Modifies the current transformation matrix (CTM) by scaling the X and Y
user-space axes by SX and SY respectively. The scaling of the axes takes
place after any existing transformation of user space.
cr
a cairo context
sx
scale factor for the X dimension
sy
scale factor for the Y dimension
This documentation was automatically generated.
cairo-rotate
- Function: cairo-rotate (CR `<cairo-t>')(ANGLE `<double>')
Modifies the current transformation matrix (CTM) by rotating the user-space
axes by ANGLE 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.
cr
a cairo context
angle
angle (in radians) by which the user-space axes will be rotated
This documentation was automatically generated.
cairo-transform
- Function: cairo-transform (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>')
Modifies the current transformation matrix (CTM) by applying MATRIX as an
additional transformation. The new transformation of user space takes place
after any existing transformation.
cr
a cairo context
matrix
a transformation to be applied to the user-space axes
This documentation was automatically generated.
cairo-set-matrix
- Function: cairo-set-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>')
Modifies the current transformation matrix (CTM) by setting it equal to
MATRIX.
cr
a cairo context
matrix
a transformation matrix from user space to device space
This documentation was automatically generated.
cairo-get-matrix
- Function: cairo-get-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>')
Stores the current transformation matrix (CTM) into MATRIX.
cr
a cairo context
matrix
return value for the matrix
This documentation was automatically generated.
cairo-identity-matrix
- Function: cairo-identity-matrix (CR `<cairo-t>')
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.
cr
a cairo context
This documentation was automatically generated.
cairo-user-to-device
- Function: cairo-user-to-device (CR `<cairo-t>') ==>(X `<double>')(Y
`<double>')
Transform a coordinate from user space to device space by multiplying the
given point by the current transformation matrix (CTM).
cr
a cairo context
x
X value of coordinate (in/out parameter)
y
Y value of coordinate (in/out parameter)
This documentation was automatically generated.
cairo-user-to-device-distance
- Function: cairo-user-to-device-distance (CR `<cairo-t>') ==>(DX `<double>')(DY
`<double>')
Transform a distance vector from user space to device space. This function
is similar to `cairo-user-to-device' except that the translation components
of the CTM will be ignored when transforming (DX,DY).
cr
a cairo context
dx
X component of a distance vector (in/out parameter)
dy
Y component of a distance vector (in/out parameter)
This documentation was automatically generated.
cairo-device-to-user
- Function: cairo-device-to-user (CR `<cairo-t>') ==>(X `<double>')(Y
`<double>')
Transform a coordinate from device space to user space by multiplying the
given point by the inverse of the current transformation matrix (CTM).
cr
a cairo
x
X value of coordinate (in/out parameter)
y
Y value of coordinate (in/out parameter)
This documentation was automatically generated.
cairo-device-to-user-distance
- Function: cairo-device-to-user-distance (CR `<cairo-t>') ==>(DX `<double>')(DY
`<double>')
Transform a distance vector from device space to user space. This function
is similar to `cairo-device-to-user' except that the translation components
of the inverse CTM will be ignored when transforming (DX,DY).
cr
a cairo context
dx
X component of a distance vector (in/out parameter)
dy
Y component of a distance vector (in/out parameter)
This documentation was automatically generated.
cairo-version
- Function: cairo-version ==>(RET `<int>')
Returns the version of the cairo library encoded in a single integer as per
CAIRO_VERSION_ENCODE. The encoding ensures that later versions compare
greater than earlier versions.
A run-time comparison to check that cairo's version is greater than or
equal to version X.Y.Z could be performed as follows:
if (cairo_version() >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...}
See also `cairo-version-string' as well as the compile-time equivalents
`CAIRO_VERSION' and `CAIRO_VERSION_STRING'.
ret
the encoded version.
This documentation was automatically generated.
cairo-version-string
- Function: cairo-version-string ==>(RET `<char>')
Returns the version of the cairo library as a human-readable string of the
form "X.Y.Z".
See also `cairo-version' as well as the compile-time equivalents
`CAIRO_VERSION_STRING' and `CAIRO_VERSION'.
ret
a string containing the version.
This documentation was automatically generated.
cairo-create
- Function: cairo-create (TARGET `<cairo-surface-t>') ==>(RET `<cairo-t>')
Creates a new `<cairo-t>' with all graphics state parameters set to default
values and with TARGET 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_<backend>_surface_create'
variant).
This function references TARGET, so you can immediately call
`cairo-surface-destroy' on it if you don't need to maintain a separate
reference to it.
target
target surface for the context
ret
a newly allocated `<cairo-t>' with a reference count of 1. The initial
reference count should be released with `cairo-destroy' when you are
done using the `<cairo-t>'. This function never returns ``#f''. If
memory cannot be allocated, a special `<cairo-t>' object will be
returned on which `cairo-status' returns `CAIRO_STATUS_NO_MEMORY'. You
can use this object normally, but no drawing will be done.
This documentation was automatically generated.
cairo-save
- Function: cairo-save (CR `<cairo-t>')
Makes a copy of the current state of CR and saves it on an internal stack
of saved states for CR. When `cairo-restore' is called, CR will be restored
to the saved state. Multiple calls to `cairo-save' and `cairo-restore' can
be nested; each call to `cairo-restore' restores the state from the
matching paired `cairo-save'.
It isn't necessary to clear all saved states before a `<cairo-t>' is freed.
If the reference count of a `<cairo-t>' drops to zero in response to a call
to `cairo-destroy', any saved states will be freed along with the
`<cairo-t>'.
cr
a `<cairo-t>'
This documentation was automatically generated.
cairo-restore
- Function: cairo-restore (CR `<cairo-t>')
Restores CR to the state saved by a preceding call to `cairo-save' and
removes that state from the stack of saved states.
cr
a `<cairo-t>'
This documentation was automatically generated.
cairo-get-target
- Function: cairo-get-target (CR `<cairo-t>') ==>(RET `<cairo-surface-t>')
Gets the target surface for the cairo context as passed to `cairo-create'.
This function will always return a valid pointer, but the result can be a
"nil" surface if CR is already in an error state, (ie.
`cairo-status'`!='`CAIRO_STATUS_SUCCESS'). A nil surface is indicated by
`cairo-surface-status'`!='`CAIRO_STATUS_SUCCESS'.
cr
a cairo context
ret
the target surface. This object is owned by cairo. To keep a reference
to it, you must call `cairo-surface-reference'.
This documentation was automatically generated.
cairo-push-group
- Function: cairo-push-group (CR `<cairo-t>')
Temporarily redirects drawing to an intermediate surface known as a group.
The redirection lasts until the group is completed by a call to
`cairo-pop-group' or `cairo-pop-group-to-source'. These calls provide the
result of any drawing to the group as a pattern, (either as an explicit
object, or set as the source pattern).
This group functionality can be convenient for performing intermediate
compositing. One common use of a group is to render objects as opaque
within the group, (so that they occlude each other), and then blend the
result with translucence onto the destination.
Groups can be nested arbitrarily deep by making balanced calls to
`cairo-push-group'/`cairo-pop-group'. Each call pushes/pops the new target
group onto/from a stack.
The `cairo-push-group' function calls `cairo-save' so that any changes to
the graphics state will not be visible outside the group, (the pop_group
functions call `cairo-restore').
By default the intermediate group will have a content type of
CAIRO_CONTENT_COLOR_ALPHA. Other content types can be chosen for the group
by using `cairo-push-group-with-content' instead.
As an example, here is how one might fill and stroke a path with
translucence, but without any portion of the fill being visible under the
stroke:
cairo_push_group (cr);
cairo_set_source (cr, fill_pattern);
cairo_fill_preserve (cr);
cairo_set_source (cr, stroke_pattern);
cairo_stroke (cr);
cairo_pop_group_to_source (cr);
cairo_paint_with_alpha (cr, alpha);
cr
a cairo context
Since 1.2
This documentation was automatically generated.
cairo-pop-group
- Function: cairo-pop-group (CR `<cairo-t>') ==>(RET `<cairo-pattern-t>')
Terminates the redirection begun by a call to `cairo-push-group' or
`cairo-push-group-with-content' and returns a new pattern containing the
results of all drawing operations performed to the group.
The `cairo-pop-group' function calls `cairo-restore', (balancing a call to
`cairo-save' by the push_group function), so that any changes to the
graphics state will not be visible outside the group.
cr
a cairo context
ret
a newly created (surface) pattern containing the results of all
drawing operations performed to the group. The caller owns the
returned object and should call `cairo-pattern-destroy' when finished
with it.
Since 1.2
This documentation was automatically generated.
cairo-pop-group-to-source
- Function: cairo-pop-group-to-source (CR `<cairo-t>')
Terminates the redirection begun by a call to `cairo-push-group' or
`cairo-push-group-with-content' and installs the resulting pattern as the
source pattern in the given cairo context.
The behavior of this function is equivalent to the sequence of operations:
cairo_pattern_t *group = cairo_pop_group (cr);
cairo_set_source (cr, group);
cairo_pattern_destroy (group);
but is more convenient as their is no need for a variable to store the
short-lived pointer to the pattern.
The `cairo-pop-group' function calls `cairo-restore', (balancing a call to
`cairo-save' by the push_group function), so that any changes to the
graphics state will not be visible outside the group.
cr
a cairo context
Since 1.2
This documentation was automatically generated.
cairo-get-group-target
- Function: cairo-get-group-target (CR `<cairo-t>') ==>(RET `<cairo-surface-t>')
Gets the target surface for the current group as started by the most recent
call to `cairo-push-group' or `cairo-push-group-with-content'.
This function will return NULL if called "outside" of any group rendering
blocks, (that is, after the last balancing call to `cairo-pop-group' or
`cairo-pop-group-to-source').
cr
a cairo context
ret
the target group surface, or NULL if none. This object is owned by
cairo. To keep a reference to it, you must call
`cairo-surface-reference'.
Since 1.2
This documentation was automatically generated.
cairo-set-source-rgb
- Function: cairo-set-source-rgb (CR `<cairo-t>')(RED `<double>')(GREEN
`<double>')(BLUE `<double>')
Sets the source pattern within CR to an opaque color. This opaque color
will then be used for any subsequent drawing operation until a new source
pattern is set.
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.
cr
a cairo context
red
red component of color
green
green component of color
blue
blue component of color
This documentation was automatically generated.
cairo-set-source-rgba
- Function: cairo-set-source-rgba (CR `<cairo-t>')(RED `<double>')(GREEN
`<double>')(BLUE `<double>')(ALPHA `<double>')
Sets the source pattern within CR to a translucent color. This color will
then be used for any subsequent drawing operation until a new source
pattern is set.
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.
cr
a cairo context
red
red component of color
green
green component of color
blue
blue component of color
alpha
alpha component of color
This documentation was automatically generated.
cairo-set-source
- Function: cairo-set-source (CR `<cairo-t>')(SOURCE `<cairo-pattern-t>')
Sets the source pattern within CR to SOURCE. This pattern will then be used
for any subsequent drawing operation until a new source pattern is set.
Note: The pattern's transformation matrix will be locked to the user space
in effect at the time of `cairo-set-source'. This means that further
modifications of the current transformation matrix will not affect the
source pattern. See `cairo-pattern-set-matrix'.
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).
cr
a cairo context
source
a `<cairo-pattern-t>' to be used as the source for subsequent drawing
operations.
This documentation was automatically generated.
cairo-set-source-surface
- Function: cairo-set-source-surface (CR `<cairo-t>')(SURFACE
`<cairo-surface-t>')(X `<double>')(Y `<double>')
This is a convenience function for creating a pattern from SURFACE and
setting it as the source in CR with `cairo-set-source'.
The X and Y 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 X and Y patterns are negated and
then set as translation values in the pattern matrix.
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 `cairo-get-source' so that these attributes can be modified
if desired, (eg. to create a repeating pattern with
`cairo-pattern-set-extend').
cr
a cairo context
surface
a surface to be used to set the source pattern
x
User-space X coordinate for surface origin
y
User-space Y coordinate for surface origin
This documentation was automatically generated.
cairo-get-source
- Function: cairo-get-source (CR `<cairo-t>') ==>(RET `<cairo-pattern-t>')
Gets the current source pattern for CR.
cr
a cairo context
ret
the current source pattern. This object is owned by cairo. To keep a
reference to it, you must call `cairo-pattern-reference'.
This documentation was automatically generated.
cairo-set-antialias
- Function: cairo-set-antialias (CR `<cairo-t>')(ANTIALIAS
`<cairo-antialias-t>')
Set the antialiasing mode of the rasterizer used for drawing shapes. This
value is a hint, and a particular backend may or may not support a
particular value. At the current time, no backend supports
`CAIRO_ANTIALIAS_SUBPIXEL' when drawing shapes.
Note that this option does not affect text rendering, instead see
`cairo-font-options-set-antialias'.
cr
a `<cairo-t>'
antialias
the new antialiasing mode
This documentation was automatically generated.
cairo-get-antialias
- Function: cairo-get-antialias (CR `<cairo-t>') ==>(RET `<cairo-antialias-t>')
Gets the current shape antialiasing mode, as set by
`cairo-set-shape-antialias'.
cr
a cairo context
ret
the current shape antialiasing mode.
This documentation was automatically generated.
cairo-set-dash
- Function: cairo-set-dash (CR `<cairo-t>') ==>(DASHES `<double>')(NUM-DASHES
`<int>')(OFFSET `<double>')
Sets the dash pattern to be used by `cairo-stroke'. A dash pattern is
specified by DASHES, an array of positive values. Each value provides the
length of alternate "on" and "off" portions of the stroke. The OFFSET
specifies an offset into the pattern at which the stroke begins.
Each "on" segment will have caps applied as if the segment were a separate
sub-path. In particular, it is valid to use an "on" length of 0.0 with
CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE in order to distributed dots
or squares along a path.
Note: The length values are in user-space units as evaluated at the time of
stroking. This is not necessarily the same as the user space at the time of
`cairo-set-dash'.
If NUM-DASHES is 0 dashing is disabled.
If NUM-DASHES is 1 a symmetric pattern is assumed with alternating on and
off portions of the size specified by the single value in DASHES.
If any value in DASHES is negative, or if all values are 0, then CAIRO-T
will be put into an error state with a status of
`<cairo-status-invalid-dash>'.
cr
a cairo context
dashes
an array specifying alternate lengths of on and off stroke portions
num-dashes
the length of the dashes array
offset
an offset into the dash pattern at which the stroke should start
This documentation was automatically generated.
cairo-get-dash-count
- Function: cairo-get-dash-count (CR `<cairo-t>') ==>(RET `<int>')
This function returns the length of the dash array in CR (0 if dashing is
not currently in effect).
See also `cairo-set-dash' and `cairo-get-dash'.
cr
a `<cairo-t>'
ret
the length of the dash array, or 0 if no dash array set.
Since 1.4
This documentation was automatically generated.
cairo-set-fill-rule
- Function: cairo-set-fill-rule (CR `<cairo-t>')(FILL-RULE
`<cairo-fill-rule-t>')
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 `<cairo-fill-rule-t>' for details on the semantics of each
available fill rule.
cr
a `<cairo-t>'
fill-rule
a fill rule, specified as a `<cairo-fill-rule-t>'
This documentation was automatically generated.
cairo-get-fill-rule
- Function: cairo-get-fill-rule (CR `<cairo-t>') ==>(RET `<cairo-fill-rule-t>')
Gets the current fill rule, as set by `cairo-set-fill-rule'.
cr
a cairo context
ret
the current fill rule.
This documentation was automatically generated.
cairo-set-line-cap
- Function: cairo-set-line-cap (CR `<cairo-t>')(LINE-CAP `<cairo-line-cap-t>')
Sets the current line cap style within the cairo context. See
`<cairo-line-cap-t>' for details about how the available line cap styles
are drawn.
As with the other stroke parameters, the current line cap style is examined
by `cairo-stroke', `cairo-stroke-extents', and `cairo-stroke-to-path', but
does not have any effect during path construction.
cr
a cairo context
line-cap
a line cap style
This documentation was automatically generated.
cairo-get-line-cap
- Function: cairo-get-line-cap (CR `<cairo-t>') ==>(RET `<cairo-line-cap-t>')
Gets the current line cap style, as set by `cairo-set-line-cap'.
cr
a cairo context
ret
the current line cap style.
This documentation was automatically generated.
cairo-set-line-join
- Function: cairo-set-line-join (CR `<cairo-t>')(LINE-JOIN
`<cairo-line-join-t>')
Sets the current line join style within the cairo context. See
`<cairo-line-join-t>' for details about how the available line join styles
are drawn.
As with the other stroke parameters, the current line join style is
examined by `cairo-stroke', `cairo-stroke-extents', and
`cairo-stroke-to-path', but does not have any effect during path
construction.
cr
a cairo context
line-join
a line joint style
This documentation was automatically generated.
cairo-get-line-join
- Function: cairo-get-line-join (CR `<cairo-t>') ==>(RET `<cairo-line-join-t>')
Gets the current line join style, as set by `cairo-set-line-join'.
cr
a cairo context
ret
the current line join style.
This documentation was automatically generated.
cairo-set-line-width
- Function: cairo-set-line-width (CR `<cairo-t>')(WIDTH `<double>')
Sets the current line width within the cairo context. The line width value
specifies the diameter of a pen that is circular in user space, (though
device-space pen may be an ellipse in general due to scaling/shear/rotation
of the CTM).
Note: When the description above refers to user space and CTM it refers to
the user space and CTM in effect at the time of the stroking operation, not
the user space and CTM in effect at the time of the call to
`cairo-set-line-width'. The simplest usage makes both of these spaces
identical. That is, if there is no change to the CTM between a call to
`cairo-set-line-with' and the stroking operation, then one can just pass
user-space values to `cairo-set-line-width' and ignore this note.
As with the other stroke parameters, the current line width is examined by
`cairo-stroke', `cairo-stroke-extents', and `cairo-stroke-to-path', but
does not have any effect during path construction.
The default line width value is 2.0.
cr
a `<cairo-t>'
width
a line width
This documentation was automatically generated.
cairo-get-line-width
- Function: cairo-get-line-width (CR `<cairo-t>') ==>(RET `<double>')
This function returns the current line width value exactly as set by
`cairo-set-line-width'. Note that the value is unchanged even if the CTM
has changed between the calls to `cairo-set-line-width' and
`cairo-get-line-width'.
cr
a cairo context
ret
the current line width.
This documentation was automatically generated.
cairo-set-miter-limit
- Function: cairo-set-miter-limit (CR `<cairo-t>')(LIMIT `<double>')
Sets the current miter limit within the cairo context.
If the current line join style is set to `CAIRO_LINE_JOIN_MITER' (see
`cairo-set-line-join'), the miter limit is used to determine whether the
lines should be joined with a bevel instead of a miter. Cairo divides the
length of the miter by the line width. If the result is greater than the
miter limit, the style is converted to a bevel.
As with the other stroke parameters, the current line miter limit is
examined by `cairo-stroke', `cairo-stroke-extents', and
`cairo-stroke-to-path', but does not have any effect during path
construction.
cr
a cairo context
limit
miter limit to set
This documentation was automatically generated.
cairo-get-miter-limit
- Function: cairo-get-miter-limit (CR `<cairo-t>') ==>(RET `<double>')
Gets the current miter limit, as set by `cairo-set-miter-limit'.
cr
a cairo context
ret
the current miter limit.
This documentation was automatically generated.
cairo-set-operator
- Function: cairo-set-operator (CR `<cairo-t>')(OP `<cairo-operator-t>')
Sets the compositing operator to be used for all drawing operations. See
`<cairo-operator-t>' for details on the semantics of each available
compositing operator.
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).
cr
a `<cairo-t>'
op
a compositing operator, specified as a `<cairo-operator-t>'
This documentation was automatically generated.
cairo-get-operator
- Function: cairo-get-operator (CR `<cairo-t>') ==>(RET `<cairo-operator-t>')
Gets the current compositing operator for a cairo context.
cr
a cairo context
ret
the current compositing operator.
This documentation was automatically generated.
cairo-set-tolerance
- Function: cairo-set-tolerance (CR `<cairo-t>')(TOLERANCE `<double>')
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 TOLERANCE.
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.)
cr
a `<cairo-t>'
tolerance
the tolerance, in device units (typically pixels)
This documentation was automatically generated.
cairo-get-tolerance
- Function: cairo-get-tolerance (CR `<cairo-t>') ==>(RET `<double>')
Gets the current tolerance value, as set by `cairo-set-tolerance'.
cr
a cairo context
ret
the current tolerance value.
This documentation was automatically generated.
cairo-clip
- Function: cairo-clip (CR `<cairo-t>')
Establishes a new clip region by intersecting the current clip region with
the current path as it would be filled by `cairo-fill' and according to the
current fill rule (see `cairo-set-fill-rule').
After cairo_clip, the current path will be cleared from the cairo context.
The current clip region affects all drawing operations by effectively
masking out any changes to the surface that are outside the current clip
region.
Calling `cairo-clip' 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 `cairo-clip'
within a `cairo-save'/`cairo-restore' pair. The only other means of
increasing the size of the clip region is `cairo-reset-clip'.
cr
a cairo context
This documentation was automatically generated.
cairo-clip-preserve
- Function: cairo-clip-preserve (CR `<cairo-t>')
Establishes a new clip region by intersecting the current clip region with
the current path as it would be filled by `cairo-fill' and according to the
current fill rule (see `cairo-set-fill-rule').
Unlike `cairo-clip', cairo_clip_preserve preserves the path within the
cairo context.
The current clip region affects all drawing operations by effectively
masking out any changes to the surface that are outside the current clip
region.
Calling `cairo-clip' 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 `cairo-clip'
within a `cairo-save'/`cairo-restore' pair. The only other means of
increasing the size of the clip region is `cairo-reset-clip'.
cr
a cairo context
This documentation was automatically generated.
cairo-clip-extents
- Function: cairo-clip-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1
`<double>')(X2 `<double>')(Y2 `<double>')
Computes a bounding box in user coordinates covering the area inside the
current clip.
cr
a cairo context
x1
left of the resulting extents
y1
top of the resulting extents
x2
right of the resulting extents
y2
bottom of the resulting extents
Since 1.4
This documentation was automatically generated.
cairo-reset-clip
- Function: cairo-reset-clip (CR `<cairo-t>')
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.
Note that code meant to be reusable should not call `cairo-reset-clip' as
it will cause results unexpected by higher-level code which calls
`cairo-clip'. Consider using `cairo-save' and `cairo-restore' around
`cairo-clip' as a more robust means of temporarily restricting the clip
region.
cr
a cairo context
This documentation was automatically generated.
cairo-copy-clip-rectangle-list
- Function: cairo-copy-clip-rectangle-list (CR `<cairo-t>') ==>(RET
`<cairo-rectangle-list-t>')
Gets the current clip region as a list of rectangles in user coordinates.
Never returns ``#f''.
The status in the list may be CAIRO_STATUS_CLIP_NOT_REPRESENTABLE to
indicate that the clip region cannot be represented as a list of user-space
rectangles. The status may have other values to indicate other errors.
The caller must always call cairo_rectangle_list_destroy on the result of
this function.
cr
a cairo context
ret
the current clip region as a list of rectangles in user coordinates.
Since 1.4
This documentation was automatically generated.
cairo-fill
- Function: cairo-fill (CR `<cairo-t>')
A drawing operator that fills the current path according to the current
fill rule, (each sub-path is implicitly closed before being filled). After
cairo_fill, the current path will be cleared from the cairo context. See
`cairo-set-fill-rule' and `cairo-fill-preserve'.
cr
a cairo context
This documentation was automatically generated.
cairo-fill-preserve
- Function: cairo-fill-preserve (CR `<cairo-t>')
A drawing operator that fills the current path according to the current
fill rule, (each sub-path is implicitly closed before being filled). Unlike
`cairo-fill', cairo_fill_preserve preserves the path within the cairo
context.
See `cairo-set-fill-rule' and `cairo-fill'.
cr
a cairo context
This documentation was automatically generated.
cairo-fill-extents
- Function: cairo-fill-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1
`<double>')(X2 `<double>')(Y2 `<double>')
Computes a bounding box in user coordinates covering the area that would be
affected by a `cairo-fill' operation given the current path and fill
parameters. If the current path is empty, returns an empty rectangle (0,0,
0,0). Surface dimensions and clipping are not taken into account.
See `cairo-fill', `cairo-set-fill-rule' and `cairo-fill-preserve'.
cr
a cairo context
x1
left of the resulting extents
y1
top of the resulting extents
x2
right of the resulting extents
y2
bottom of the resulting extents
This documentation was automatically generated.
cairo-in-fill
- Function: cairo-in-fill (CR `<cairo-t>')(X `<double>')(Y `<double>') ==>(RET
`<cairo-bool-t>')
Tests whether the given point is inside the area that would be affected by
a `cairo-fill' operation given the current path and filling parameters.
Surface dimensions and clipping are not taken into account.
See `cairo-fill', `cairo-set-fill-rule' and `cairo-fill-preserve'.
cr
a cairo context
x
X coordinate of the point to test
y
Y coordinate of the point to test
ret
A non-zero value if the point is inside, or zero if outside.
This documentation was automatically generated.
cairo-mask
- Function: cairo-mask (CR `<cairo-t>')(PATTERN `<cairo-pattern-t>')
A drawing operator that paints the current source using the alpha channel
of PATTERN as a mask. (Opaque areas of PATTERN are painted with the source,
transparent areas are not painted.)
cr
a cairo context
pattern
a `<cairo-pattern-t>'
This documentation was automatically generated.
cairo-mask-surface
- Function: cairo-mask-surface (CR `<cairo-t>')(SURFACE
`<cairo-surface-t>')(SURFACE-X `<double>')(SURFACE-Y `<double>')
A drawing operator that paints the current source using the alpha channel
of SURFACE as a mask. (Opaque areas of SURFACE are painted with the source,
transparent areas are not painted.)
cr
a cairo context
surface
a `<cairo-surface-t>'
surface-x
X coordinate at which to place the origin of SURFACE
surface-y
Y coordinate at which to place the origin of SURFACE
This documentation was automatically generated.
cairo-paint
- Function: cairo-paint (CR `<cairo-t>')
A drawing operator that paints the current source everywhere within the
current clip region.
cr
a cairo context
This documentation was automatically generated.
cairo-paint-with-alpha
- Function: cairo-paint-with-alpha (CR `<cairo-t>')(ALPHA `<double>')
A drawing operator that paints the current source everywhere within the
current clip region using a mask of constant alpha value ALPHA. The effect
is similar to `cairo-paint', but the drawing is faded out using the alpha
value.
cr
a cairo context
alpha
alpha value, between 0 (transparent) and 1 (opaque)
This documentation was automatically generated.
cairo-stroke
- Function: cairo-stroke (CR `<cairo-t>')
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
`cairo-set-line-width', `cairo-set-line-join', `cairo-set-line-cap',
`cairo-set-dash', and `cairo-stroke-preserve'.
Note: Degenerate segments and sub-paths are treated specially and provide a
useful result. These can result in two different situations:
1. Zero-length "on" segments set in `cairo-set-dash'. If the cap style is
CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE then these segments will be
drawn as circular dots or squares respectively. In the case of
CAIRO_LINE_CAP_SQUARE, the orientation of the squares is determined by the
direction of the underlying path.
2. A sub-path created by `cairo-move-to' followed by either a
`cairo-close-path' or one or more calls to `cairo-line-to' to the same
coordinate as the `cairo-move-to'. If the cap style is CAIRO_LINE_CAP_ROUND
then these sub-paths will be drawn as circular dots. Note that in the case
of CAIRO_LINE_CAP_SQUARE a degenerate sub-path will not be drawn at all,
(since the correct orientation is indeterminate).
In no case will a cap style of CAIRO_LINE_CAP_BUTT cause anything to be
drawn in the case of either degenerate segments or sub-paths.
cr
a cairo context
This documentation was automatically generated.
cairo-stroke-preserve
- Function: cairo-stroke-preserve (CR `<cairo-t>')
A drawing operator that strokes the current path according to the current
line width, line join, line cap, and dash settings. Unlike `cairo-stroke',
cairo_stroke_preserve preserves the path within the cairo context.
See `cairo-set-line-width', `cairo-set-line-join', `cairo-set-line-cap',
`cairo-set-dash', and `cairo-stroke-preserve'.
cr
a cairo context
This documentation was automatically generated.
cairo-stroke-extents
- Function: cairo-stroke-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1
`<double>')(X2 `<double>')(Y2 `<double>')
Computes a bounding box in user coordinates covering the area that would be
affected by a `cairo-stroke' operation operation given the current path and
stroke parameters. If the current path is empty,
cr
a cairo context
x1
left of the resulting extents
y1
top of the resulting extents
x2
right of the resulting extents
y2
bottom of the resulting extents
This documentation was automatically generated.
cairo-in-stroke
- Function: cairo-in-stroke (CR `<cairo-t>')(X `<double>')(Y `<double>') ==>(RET
`<cairo-bool-t>')
Tests whether the given point is inside the area that would be affected by
a `cairo-stroke' operation given the current path and stroking parameters.
Surface dimensions and clipping are not taken into account.
See `cairo-stroke', `cairo-set-line-width', `cairo-set-line-join',
`cairo-set-line-cap', `cairo-set-dash', and `cairo-stroke-preserve'.
cr
a cairo context
x
X coordinate of the point to test
y
Y coordinate of the point to test
ret
A non-zero value if the point is inside, or zero if outside.
This documentation was automatically generated.
cairo-copy-page
- Function: cairo-copy-page (CR `<cairo-t>')
Emits the current page for backends that support multiple pages, but
doesn't clear it, so, the contents of the current page will be retained for
the next page too. Use `cairo-show-page' if you want to get an empty page
after the emission.
cr
a cairo context
This documentation was automatically generated.
cairo-show-page
- Function: cairo-show-page (CR `<cairo-t>')
Emits and clears the current page for backends that support multiple pages.
Use `cairo-copy-page' if you don't want to clear the page.
cr
a cairo context
This documentation was automatically generated.
|