Skip to content
This repository
Tomas Alabes
file 2489 lines (2488 sloc) 239.75 kb
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
<!DOCTYPE html>
<!-- Generated with Dr.js -->
<html lang="en"><head><meta charset="utf-8"><title>Raphaël Reference</title><link rel="stylesheet" href="dr.css" media="screen"><link rel="stylesheet" href="dr-print.css" media="print"></head><body id="dr-js"><div id="dr"><ol class="dr-toc" id="dr-toc"><li class="dr-lvl0"><a href="#Animation" class="{clas}"><span>Animation</span></a></li><li class="dr-lvl1"><a href="#Animation.delay" class="dr-method"><span>Animation.delay()</span></a></li><li class="dr-lvl1"><a href="#Animation.repeat" class="dr-method"><span>Animation.repeat()</span></a></li><li class="dr-lvl0"><a href="#Element" class="{clas}"><span>Element</span></a></li><li class="dr-lvl1"><a href="#Element.animate" class="dr-method"><span>Element.animate()</span></a></li><li class="dr-lvl1"><a href="#Element.animateWith" class="dr-method"><span>Element.animateWith()</span></a></li><li class="dr-lvl1"><a href="#Element.attr" class="dr-method"><span>Element.attr()</span></a></li><li class="dr-lvl1"><a href="#Element.click" class="dr-method"><span>Element.click()</span></a></li><li class="dr-lvl1"><a href="#Element.clone" class="dr-method"><span>Element.clone()</span></a></li><li class="dr-lvl1"><a href="#Element.data" class="dr-method"><span>Element.data()</span></a></li><li class="dr-lvl1"><a href="#Element.dblclick" class="dr-method"><span>Element.dblclick()</span></a></li><li class="dr-lvl1"><a href="#Element.drag" class="dr-method"><span>Element.drag()</span></a></li><li class="dr-lvl1"><a href="#Element.getBBox" class="dr-method"><span>Element.getBBox()</span></a></li><li class="dr-lvl1"><a href="#Element.getPointAtLength" class="dr-method"><span>Element.getPointAtLength()</span></a></li><li class="dr-lvl1"><a href="#Element.getSubpath" class="dr-method"><span>Element.getSubpath()</span></a></li><li class="dr-lvl1"><a href="#Element.getTotalLength" class="dr-method"><span>Element.getTotalLength()</span></a></li><li class="dr-lvl1"><a href="#Element.glow" class="dr-method"><span>Element.glow()</span></a></li><li class="dr-lvl1"><a href="#Element.hide" class="dr-method"><span>Element.hide()</span></a></li><li class="dr-lvl1"><a href="#Element.hover" class="dr-method"><span>Element.hover()</span></a></li><li class="dr-lvl1"><a href="#Element.id" class="dr-property"><span>Element.id</span></a></li><li class="dr-lvl1"><a href="#Element.insertAfter" class="dr-method"><span>Element.insertAfter()</span></a></li><li class="dr-lvl1"><a href="#Element.insertBefore" class="dr-method"><span>Element.insertBefore()</span></a></li><li class="dr-lvl1"><a href="#Element.isPointInside" class="dr-method"><span>Element.isPointInside()</span></a></li><li class="dr-lvl1"><a href="#Element.matrix" class="dr-property"><span>Element.matrix</span></a></li><li class="dr-lvl1"><a href="#Element.mousedown" class="dr-method"><span>Element.mousedown()</span></a></li><li class="dr-lvl1"><a href="#Element.mousemove" class="dr-method"><span>Element.mousemove()</span></a></li><li class="dr-lvl1"><a href="#Element.mouseout" class="dr-method"><span>Element.mouseout()</span></a></li><li class="dr-lvl1"><a href="#Element.mouseover" class="dr-method"><span>Element.mouseover()</span></a></li><li class="dr-lvl1"><a href="#Element.mouseup" class="dr-method"><span>Element.mouseup()</span></a></li><li class="dr-lvl1"><a href="#Element.next" class="dr-property"><span>Element.next</span></a></li><li class="dr-lvl1"><a href="#Element.node" class="dr-property"><span>Element.node</span></a></li><li class="dr-lvl1"><a href="#Element.onDragOver" class="dr-method"><span>Element.onDragOver()</span></a></li><li class="dr-lvl1"><a href="#Element.paper" class="dr-property"><span>Element.paper</span></a></li><li class="dr-lvl1"><a href="#Element.pause" class="dr-method"><span>Element.pause()</span></a></li><li class="dr-lvl1"><a href="#Element.prev" class="dr-property"><span>Element.prev</span></a></li><li class="dr-lvl1"><a href="#Element.raphael" class="dr-property"><span>Element.raphael</span></a></li><li class="dr-lvl1"><a href="#Element.remove" class="dr-method"><span>Element.remove()</span></a></li><li class="dr-lvl1"><a href="#Element.removeData" class="dr-method"><span>Element.removeData()</span></a></li><li class="dr-lvl1"><a href="#Element.resume" class="dr-method"><span>Element.resume()</span></a></li><li class="dr-lvl1"><a href="#Element.rotate" class="dr-method"><span>Element.rotate()</span></a></li><li class="dr-lvl1"><a href="#Element.scale" class="dr-method"><span>Element.scale()</span></a></li><li class="dr-lvl1"><a href="#Element.setTime" class="dr-method"><span>Element.setTime()</span></a></li><li class="dr-lvl1"><a href="#Element.show" class="dr-method"><span>Element.show()</span></a></li><li class="dr-lvl1"><a href="#Element.status" class="dr-method"><span>Element.status()</span></a></li><li class="dr-lvl1"><a href="#Element.stop" class="dr-method"><span>Element.stop()</span></a></li><li class="dr-lvl1"><a href="#Element.toBack" class="dr-method"><span>Element.toBack()</span></a></li><li class="dr-lvl1"><a href="#Element.toFront" class="dr-method"><span>Element.toFront()</span></a></li><li class="dr-lvl1"><a href="#Element.touchcancel" class="dr-method"><span>Element.touchcancel()</span></a></li><li class="dr-lvl1"><a href="#Element.touchend" class="dr-method"><span>Element.touchend()</span></a></li><li class="dr-lvl1"><a href="#Element.touchmove" class="dr-method"><span>Element.touchmove()</span></a></li><li class="dr-lvl1"><a href="#Element.touchstart" class="dr-method"><span>Element.touchstart()</span></a></li><li class="dr-lvl1"><a href="#Element.transform" class="dr-method"><span>Element.transform()</span></a></li><li class="dr-lvl1"><a href="#Element.translate" class="dr-method"><span>Element.translate()</span></a></li><li class="dr-lvl1"><a href="#Element.unclick" class="dr-method"><span>Element.unclick()</span></a></li><li class="dr-lvl1"><a href="#Element.undblclick" class="dr-method"><span>Element.undblclick()</span></a></li><li class="dr-lvl1"><a href="#Element.undrag" class="dr-method"><span>Element.undrag()</span></a></li><li class="dr-lvl1"><a href="#Element.unhover" class="dr-method"><span>Element.unhover()</span></a></li><li class="dr-lvl1"><a href="#Element.unmousedown" class="dr-method"><span>Element.unmousedown()</span></a></li><li class="dr-lvl1"><a href="#Element.unmousemove" class="dr-method"><span>Element.unmousemove()</span></a></li><li class="dr-lvl1"><a href="#Element.unmouseout" class="dr-method"><span>Element.unmouseout()</span></a></li><li class="dr-lvl1"><a href="#Element.unmouseover" class="dr-method"><span>Element.unmouseover()</span></a></li><li class="dr-lvl1"><a href="#Element.unmouseup" class="dr-method"><span>Element.unmouseup()</span></a></li><li class="dr-lvl1"><a href="#Element.untouchcancel" class="dr-method"><span>Element.untouchcancel()</span></a></li><li class="dr-lvl1"><a href="#Element.untouchend" class="dr-method"><span>Element.untouchend()</span></a></li><li class="dr-lvl1"><a href="#Element.untouchmove" class="dr-method"><span>Element.untouchmove()</span></a></li><li class="dr-lvl1"><a href="#Element.untouchstart" class="dr-method"><span>Element.untouchstart()</span></a></li><li class="dr-lvl0"><a href="#Matrix" class="{clas}"><span>Matrix</span></a></li><li class="dr-lvl1"><a href="#Matrix.add" class="dr-method"><span>Matrix.add()</span></a></li><li class="dr-lvl1"><a href="#Matrix.clone" class="dr-method"><span>Matrix.clone()</span></a></li><li class="dr-lvl1"><a href="#Matrix.invert" class="dr-method"><span>Matrix.invert()</span></a></li><li class="dr-lvl1"><a href="#Matrix.rotate" class="dr-method"><span>Matrix.rotate()</span></a></li><li class="dr-lvl1"><a href="#Matrix.scale" class="dr-method"><span>Matrix.scale()</span></a></li><li class="dr-lvl1"><a href="#Matrix.split" class="dr-method"><span>Matrix.split()</span></a></li><li class="dr-lvl1"><a href="#Matrix.toTransformString" class="dr-method"><span>Matrix.toTransformString()</span></a></li><li class="dr-lvl1"><a href="#Matrix.translate" class="dr-method"><span>Matrix.translate()</span></a></li><li class="dr-lvl1"><a href="#Matrix.x" class="dr-method"><span>Matrix.x()</span></a></li><li class="dr-lvl1"><a href="#Matrix.y" class="dr-method"><span>Matrix.y()</span></a></li><li class="dr-lvl0"><a href="#Paper" class="{clas}"><span>Paper</span></a></li><li class="dr-lvl1"><a href="#Paper.add" class="dr-method"><span>Paper.add()</span></a></li><li class="dr-lvl1"><a href="#Paper.bottom" class="dr-property"><span>Paper.bottom</span></a></li><li class="dr-lvl1"><a href="#Paper.ca" class="dr-property"><span>Paper.ca</span></a></li><li class="dr-lvl1"><a href="#Paper.circle" class="dr-method"><span>Paper.circle()</span></a></li><li class="dr-lvl1"><a href="#Paper.clear" class="dr-method"><span>Paper.clear()</span></a></li><li class="dr-lvl1"><a href="#Paper.customAttributes" class="dr-property"><span>Paper.customAttributes</span></a></li><li class="dr-lvl1"><a href="#Paper.ellipse" class="dr-method"><span>Paper.ellipse()</span></a></li><li class="dr-lvl1"><a href="#Paper.forEach" class="dr-method"><span>Paper.forEach()</span></a></li><li class="dr-lvl1"><a href="#Paper.getById" class="dr-method"><span>Paper.getById()</span></a></li><li class="dr-lvl1"><a href="#Paper.getElementByPoint" class="dr-method"><span>Paper.getElementByPoint()</span></a></li><li class="dr-lvl1"><a href="#Paper.getElementsByPoint" class="dr-method"><span>Paper.getElementsByPoint()</span></a></li><li class="dr-lvl1"><a href="#Paper.getFont" class="dr-method"><span>Paper.getFont()</span></a></li><li class="dr-lvl1"><a href="#Paper.image" class="dr-method"><span>Paper.image()</span></a></li><li class="dr-lvl1"><a href="#Paper.path" class="dr-method"><span>Paper.path()</span></a></li><li class="dr-lvl1"><a href="#Paper.print" class="dr-method"><span>Paper.print()</span></a></li><li class="dr-lvl1"><a href="#Paper.raphael" class="dr-property"><span>Paper.raphael</span></a></li><li class="dr-lvl1"><a href="#Paper.rect" class="dr-method"><span>Paper.rect()</span></a></li><li class="dr-lvl1"><a href="#Paper.remove" class="dr-method"><span>Paper.remove()</span></a></li><li class="dr-lvl1"><a href="#Paper.renderfix" class="dr-method"><span>Paper.renderfix()</span></a></li><li class="dr-lvl1"><a href="#Paper.safari" class="dr-method"><span>Paper.safari()</span></a></li><li class="dr-lvl1"><a href="#Paper.set" class="dr-method"><span>Paper.set()</span></a></li><li class="dr-lvl1"><a href="#Paper.setFinish" class="dr-method"><span>Paper.setFinish()</span></a></li><li class="dr-lvl1"><a href="#Paper.setSize" class="dr-method"><span>Paper.setSize()</span></a></li><li class="dr-lvl1"><a href="#Paper.setStart" class="dr-method"><span>Paper.setStart()</span></a></li><li class="dr-lvl1"><a href="#Paper.setViewBox" class="dr-method"><span>Paper.setViewBox()</span></a></li><li class="dr-lvl1"><a href="#Paper.text" class="dr-method"><span>Paper.text()</span></a></li><li class="dr-lvl1"><a href="#Paper.top" class="dr-property"><span>Paper.top</span></a></li><li class="dr-lvl0"><a href="#Raphael" class="dr-method"><span>Raphael()</span></a></li><li class="dr-lvl1"><a href="#Raphael.angle" class="dr-method"><span>Raphael.angle()</span></a></li><li class="dr-lvl1"><a href="#Raphael.animation" class="dr-method"><span>Raphael.animation()</span></a></li><li class="dr-lvl1"><a href="#Raphael.bezierBBox" class="dr-method"><span>Raphael.bezierBBox()</span></a></li><li class="dr-lvl1"><a href="#Raphael.color" class="dr-method"><span>Raphael.color()</span></a></li><li class="dr-lvl1"><a href="#Raphael.createUUID" class="dr-method"><span>Raphael.createUUID()</span></a></li><li class="dr-lvl1"><a href="#Raphael.deg" class="dr-method"><span>Raphael.deg()</span></a></li><li class="dr-lvl1"><a href="#Raphael.easing_formulas" class="dr-property"><span>Raphael.easing_formulas</span></a></li><li class="dr-lvl1"><a href="#Raphael.el" class="dr-property"><span>Raphael.el</span></a></li><li class="dr-lvl1"><a href="#Raphael.findDotsAtSegment" class="dr-method"><span>Raphael.findDotsAtSegment()</span></a></li><li class="dr-lvl1"><a href="#Raphael.fn" class="dr-property"><span>Raphael.fn</span></a></li><li class="dr-lvl1"><a href="#Raphael.format" class="dr-method"><span>Raphael.format()</span></a></li><li class="dr-lvl1"><a href="#Raphael.fullfill" class="dr-method"><span>Raphael.fullfill()</span></a></li><li class="dr-lvl1"><a href="#Raphael.getColor" class="dr-method"><span>Raphael.getColor()</span></a></li><li class="dr-lvl2"><a href="#Raphael.getColor.reset" class="dr-method"><span>Raphael.getColor.reset()</span></a></li><li class="dr-lvl1"><a href="#Raphael.getPointAtLength" class="dr-method"><span>Raphael.getPointAtLength()</span></a></li><li class="dr-lvl1"><a href="#Raphael.getRGB" class="dr-method"><span>Raphael.getRGB()</span></a></li><li class="dr-lvl1"><a href="#Raphael.getSubpath" class="dr-method"><span>Raphael.getSubpath()</span></a></li><li class="dr-lvl1"><a href="#Raphael.getTotalLength" class="dr-method"><span>Raphael.getTotalLength()</span></a></li><li class="dr-lvl1"><a href="#Raphael.hsb" class="dr-method"><span>Raphael.hsb()</span></a></li><li class="dr-lvl1"><a href="#Raphael.hsb2rgb" class="dr-method"><span>Raphael.hsb2rgb()</span></a></li><li class="dr-lvl1"><a href="#Raphael.hsl" class="dr-method"><span>Raphael.hsl()</span></a></li><li class="dr-lvl1"><a href="#Raphael.hsl2rgb" class="dr-method"><span>Raphael.hsl2rgb()</span></a></li><li class="dr-lvl1"><a href="#Raphael.is" class="dr-method"><span>Raphael.is()</span></a></li><li class="dr-lvl1"><a href="#Raphael.isBBoxIntersect" class="dr-method"><span>Raphael.isBBoxIntersect()</span></a></li><li class="dr-lvl1"><a href="#Raphael.isPointInsideBBox" class="dr-method"><span>Raphael.isPointInsideBBox()</span></a></li><li class="dr-lvl1"><a href="#Raphael.isPointInsidePath" class="dr-method"><span>Raphael.isPointInsidePath()</span></a></li><li class="dr-lvl1"><a href="#Raphael.mapPath" class="dr-method"><span>Raphael.mapPath()</span></a></li><li class="dr-lvl1"><a href="#Raphael.matrix" class="dr-method"><span>Raphael.matrix()</span></a></li><li class="dr-lvl1"><a href="#Raphael.ninja" class="dr-method"><span>Raphael.ninja()</span></a></li><li class="dr-lvl1"><a href="#Raphael.parsePathString" class="dr-method"><span>Raphael.parsePathString()</span></a></li><li class="dr-lvl1"><a href="#Raphael.parseTransformString" class="dr-method"><span>Raphael.parseTransformString()</span></a></li><li class="dr-lvl1"><a href="#Raphael.path2curve" class="dr-method"><span>Raphael.path2curve()</span></a></li><li class="dr-lvl1"><a href="#Raphael.pathBBox" class="dr-method"><span>Raphael.pathBBox()</span></a></li><li class="dr-lvl1"><a href="#Raphael.pathIntersection" class="dr-method"><span>Raphael.pathIntersection()</span></a></li><li class="dr-lvl1"><a href="#Raphael.pathToRelative" class="dr-method"><span>Raphael.pathToRelative()</span></a></li><li class="dr-lvl1"><a href="#Raphael.rad" class="dr-method"><span>Raphael.rad()</span></a></li><li class="dr-lvl1"><a href="#Raphael.registerFont" class="dr-method"><span>Raphael.registerFont()</span></a></li><li class="dr-lvl1"><a href="#Raphael.rgb" class="dr-method"><span>Raphael.rgb()</span></a></li><li class="dr-lvl1"><a href="#Raphael.rgb2hsb" class="dr-method"><span>Raphael.rgb2hsb()</span></a></li><li class="dr-lvl1"><a href="#Raphael.rgb2hsl" class="dr-method"><span>Raphael.rgb2hsl()</span></a></li><li class="dr-lvl1"><a href="#Raphael.setWindow" class="dr-method"><span>Raphael.setWindow()</span></a></li><li class="dr-lvl1"><a href="#Raphael.snapTo" class="dr-method"><span>Raphael.snapTo()</span></a></li><li class="dr-lvl1"><a href="#Raphael.st" class="dr-property"><span>Raphael.st</span></a></li><li class="dr-lvl1"><a href="#Raphael.svg" class="dr-property"><span>Raphael.svg</span></a></li><li class="dr-lvl1"><a href="#Raphael.toMatrix" class="dr-method"><span>Raphael.toMatrix()</span></a></li><li class="dr-lvl1"><a href="#Raphael.transformPath" class="dr-method"><span>Raphael.transformPath()</span></a></li><li class="dr-lvl1"><a href="#Raphael.type" class="dr-property"><span>Raphael.type</span></a></li><li class="dr-lvl1"><a href="#Raphael.vml" class="dr-property"><span>Raphael.vml</span></a></li><li class="dr-lvl0"><a href="#Set" class="{clas}"><span>Set</span></a></li><li class="dr-lvl1"><a href="#Set.clear" class="dr-method"><span>Set.clear()</span></a></li><li class="dr-lvl1"><a href="#Set.exclude" class="dr-method"><span>Set.exclude()</span></a></li><li class="dr-lvl1"><a href="#Set.forEach" class="dr-method"><span>Set.forEach()</span></a></li><li class="dr-lvl1"><a href="#Set.pop" class="dr-method"><span>Set.pop()</span></a></li><li class="dr-lvl1"><a href="#Set.push" class="dr-method"><span>Set.push()</span></a></li><li class="dr-lvl1"><a href="#Set.splice" class="dr-method"><span>Set.splice()</span></a></li><li class="dr-lvl0"><a href="#eve" class="dr-method"><span>eve()</span></a></li><li class="dr-lvl1"><a href="#eve.listeners" class="dr-method"><span>eve.listeners()</span></a></li><li class="dr-lvl1"><a href="#eve.nt" class="dr-method"><span>eve.nt()</span></a></li><li class="dr-lvl1"><a href="#eve.off" class="dr-method"><span>eve.off()</span></a></li><li class="dr-lvl1"><a href="#eve.on" class="dr-method"><span>eve.on()</span></a></li><li class="dr-lvl1"><a href="#eve.once" class="dr-method"><span>eve.once()</span></a></li><li class="dr-lvl1"><a href="#eve.stop" class="dr-method"><span>eve.stop()</span></a></li><li class="dr-lvl1"><a href="#eve.unbind" class="dr-method"><span>eve.unbind()</span></a></li><li class="dr-lvl1"><a href="#eve.version" class="dr-property"><span>eve.version</span></a></li></ol><div class="dr-doc"><h1>Raphaël Reference</h1><div class="Animation-section"><h2 id="Animation" class="undefined"><i class="dr-trixie">&#160;</i>Animation<a href="#Animation" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Animation-extra"></div></div><div class="Animation-delay-section"><h3 id="Animation.delay" class="dr-method"><i class="dr-trixie">&#160;</i>Animation.delay(delay)<a href="#Animation.delay" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4196 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4196">&#x27ad;</a></h3>
<div class="extra" id="Animation.delay-extra"></div></div><div class="dr-method"><p>Creates a copy of existing animation object with given delay.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">delay</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number of ms to pass between animation start and actual animation</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">new altered Animation object</span></p>
<pre class="javascript code"><code><b>var</b> anim<span class="s"> = </span>Raphael.animation({cx: <span class="d">10</span>, cy: <span class="d">20</span>}, <span class="d">2e3</span>);
circle1.animate(anim); <span class="c">// run the given animation immediately</span>
circle2.animate(anim.delay(<span class="d">500</span>)); <span class="c">// run the given animation after <span class="d">500</span> ms</span>
</code></pre>
</div><div class="Animation-repeat-section"><h3 id="Animation.repeat" class="dr-method"><i class="dr-trixie">&#160;</i>Animation.repeat(repeat)<a href="#Animation.repeat" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4214 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4214">&#x27ad;</a></h3>
<div class="extra" id="Animation.repeat-extra"></div></div><div class="dr-method"><p>Creates a copy of existing animation object with given repetition.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">repeat</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number iterations of animation. For infinite animation pass <code>Infinity</code></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">new altered Animation object</span></p>
</div><div class="Element-section"><h2 id="Element" class="undefined"><i class="dr-trixie">&#160;</i>Element<a href="#Element" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Element-extra"></div></div><div class="Element-animate-section"><h3 id="Element.animate" class="dr-method"><i class="dr-trixie">&#160;</i>Element.animate(…)<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4484 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4484">&#x27ad;</a></h3>
<div class="extra" id="Element.animate-extra"></div></div><div class="dr-method"><p>Creates and starts animation for given element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">params</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">final attributes for the element, see also <a href="#Element.attr" class="dr-link">Element.attr</a></dd>
<dt class="dr-param">ms</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number of milliseconds for animation to run</dd>
<dt class="dr-param optional">easing</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">easing type. Accept one of <a href="#Raphael.easing_formulas" class="dr-link">Raphael.easing_formulas</a> or CSS format: <code>cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)</code></dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function. Will be called at the end of animation.</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">animation</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object, see <a href="#Raphael.animation" class="dr-link">Raphael.animation</a></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element</span></p>
</div><div class="Element-animateWith-section"><h3 id="Element.animateWith" class="dr-method"><i class="dr-trixie">&#160;</i>Element.animateWith(…)<a href="#Element.animateWith" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4087 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4087">&#x27ad;</a></h3>
<div class="extra" id="Element.animateWith-extra"></div></div><div class="dr-method"><p>Acts similar to <a href="#Element.animate" class="dr-link">Element.animate</a>, but ensure that given animation runs in sync with another given element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">el</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">element to sync with</dd>
<dt class="dr-param">anim</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation to sync with</dd>
<dt class="dr-param optional">params</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">final attributes for the element, see also <a href="#Element.attr" class="dr-link">Element.attr</a></dd>
<dt class="dr-param optional">ms</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number of milliseconds for animation to run</dd>
<dt class="dr-param optional">easing</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">easing type. Accept on of <a href="#Raphael.easing_formulas" class="dr-link">Raphael.easing_formulas</a> or CSS format: <code>cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)</code></dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function. Will be called at the end of animation.</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">element</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">element to sync with</dd>
<dt class="dr-param">anim</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation to sync with</dd>
<dt class="dr-param optional">animation</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object, see <a href="#Raphael.animation" class="dr-link">Raphael.animation</a></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element</span></p>
</div><div class="Element-attr-section"><h3 id="Element.attr" class="dr-method"><i class="dr-trixie">&#160;</i>Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 988 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L988">&#x27ad;</a></h3>
<div class="extra" id="Element.attr-extra"></div></div><div class="dr-method"><p>Sets the attributes of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">attrName</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">attribute’s name</dd>
<dt class="dr-param">value</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">value</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">params</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">object of name/value pairs</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">attrName</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">attribute’s name</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">attrNames</dt>
<dd class="dr-type"><em class="dr-type-array">array</em></dd>
<dd class="dr-description">in this case method returns array of current values for given attribute names</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a> if attrsName <em class="amp">&amp;</em> value or params are passed in.</span></p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-...">...</em> <span class="dr-description">value of the attribute if only attrsName is passed in.</span></p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of values of the attribute if attrsNames is passed in.</span></p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">object of attributes if nothing is passed in.</span></p>
<p class="header">Possible parameters
</p>
<p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>
<ol class="dr-json"><li><span class="dr-json-key">arrow-end</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">arrowhead on the end of the path. The format for string is <code>&lt;type>[-&lt;width>[-&lt;length>]]</code>. Possible types: <code>classic</code>, <code>block</code>, <code>open</code>, <code>oval</code>, <code>diamond</code>, <code>none</code>, width: <code>wide</code>, <code>narrow</code>, <code>medium</code>, length: <code>long</code>, <code>short</code>, <code>midium</code>.</span>
<li><span class="dr-json-key">clip-rect</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">comma or space separated values: x, y, width and height</span>
<li><span class="dr-json-key">cursor</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">CSS type of the cursor</span>
<li><span class="dr-json-key">cx</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">the x-axis coordinate of the center of the circle, or ellipse</span>
<li><span class="dr-json-key">cy</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">the y-axis coordinate of the center of the circle, or ellipse</span>
<li><span class="dr-json-key">fill</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">colour, gradient or image</span>
<li><span class="dr-json-key">fill-opacity</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">font</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">font-family</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">font-size</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">font size in pixels</span>
<li><span class="dr-json-key">font-weight</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">height</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">href</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">URL, if specified element behaves as hyperlink</span>
<li><span class="dr-json-key">opacity</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">path</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">SVG path string format</span>
<li><span class="dr-json-key">r</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">radius of the circle, ellipse or rounded corner on the rect</span>
<li><span class="dr-json-key">rx</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">horisontal radius of the ellipse</span>
<li><span class="dr-json-key">ry</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">vertical radius of the ellipse</span>
<li><span class="dr-json-key">src</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">image URL, only works for <a href="#Element.image" class="dr-link">Element.image</a> element</span>
<li><span class="dr-json-key">stroke</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">stroke colour</span>
<li><span class="dr-json-key">stroke-dasharray</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">[“”, “<code>-</code>”, “<code>.</code>”, “<code>-.</code>”, “<code>-..</code>”, “<code>. </code>”, “<code>- </code>”, “<code>--</code>”, “<code>- .</code>”, “<code>--.</code>”, “<code>--..</code>”]</span>
<li><span class="dr-json-key">stroke-linecap</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">[“<code>butt</code>”, “<code>square</code>”, “<code>round</code>”]</span>
<li><span class="dr-json-key">stroke-linejoin</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">[“<code>bevel</code>”, “<code>round</code>”, “<code>miter</code>”]</span>
<li><span class="dr-json-key">stroke-miterlimit</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">stroke-opacity</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">stroke-width</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">stroke width in pixels, default is '1'</span>
<li><span class="dr-json-key">target</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">used with href</span>
<li><span class="dr-json-key">text</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">contents of the text element. Use <code>\n</code> for multiline text</span>
<li><span class="dr-json-key">text-anchor</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">[“<code>start</code>”, “<code>middle</code>”, “<code>end</code>”], default is “<code>middle</code></span>
<li><span class="dr-json-key">title</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">will create tooltip with a given text</span>
<li><span class="dr-json-key">transform</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">see <a href="#Element.transform" class="dr-link">Element.transform</a></span>
<li><span class="dr-json-key">width</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">x</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
<li><span class="dr-json-key">y</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">&#160;</span>
</ol>
<p class="header">Gradients
<p>Linear gradient format: “<code>‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›</code>”, example: “<code>90-#fff-#000</code>” – 90°
gradient from white to black or “<code>0-#fff-#f00:20-#000</code>” – 0° gradient from white via red (at 20%) to black.
</p>
<p>radial gradient: “<code>r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›</code>”, example: “<code>r#fff-#000</code>” –
gradient from white to black or “<code>r(0.25, 0.75)#fff-#000</code>” – gradient from white to black with focus point
at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.
</p>
<p class="header">Path String
</p>
<p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>
<p class="header">Colour Parsing
</p>
<ul>
    <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
    <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
    <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
    <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
    <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
    <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200,&nbsp;100,&nbsp;0, .5)</code>”)</li>
    <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%,&nbsp;175%,&nbsp;0%, 50%)</code>”)</li>
    <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
    <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
    <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>
    <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>
    <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>
    <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>
    <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg,&nbsp;1,&nbsp;.5)</code>” or, if you want to go fancy, “<code>hsl(240°,&nbsp;1,&nbsp;.5)</code></li>
</ul>
</div><div class="Element-click-section"><h3 id="Element.click" class="dr-method"><i class="dr-trixie">&#160;</i>Element.click(handler)<a href="#Element.click" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2798 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2798">&#x27ad;</a></h3>
<div class="extra" id="Element.click-extra"></div></div><div class="dr-method"><p>Adds event handler for click for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-clone-section"><h3 id="Element.clone" class="dr-method"><i class="dr-trixie">&#160;</i>Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3633 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3633">&#x27ad;</a></h3>
<div class="extra" id="Element.clone-extra"></div></div><div class="dr-method"><p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">clone of a given element</span></p>
</div><div class="Element-data-section"><h3 id="Element.data" class="dr-method"><i class="dr-trixie">&#160;</i>Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3043 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3043">&#x27ad;</a></h3>
<div class="extra" id="Element.data-extra"></div></div><div class="dr-method"><p>Adds or retrieves given value asociated with given key.
See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">key</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">key to store data</dd>
<dt class="dr-param optional">value</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-any">any</em></dd>
<dd class="dr-description">value to store</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
<p>or, if value is not specified:
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-any">any</em> <span class="dr-description">value</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>for</b> (<b>var</b> i<span class="s"> = </span><span class="d">0</span>, i &lt; <span class="d">5</span>, i++) {
    paper.circle(<span class="d">10</span><span class="s"> + </span><span class="d">15</span><span class="s"> * </span>i, <span class="d">10</span>, <span class="d">10</span>)
         .attr({fill: <i>"#<span class="d">000</span>"</i>})
         .data(<i>"i"</i>, i)
         .click(<b>function</b> () {
            alert(<b>this</b>.data(<i>"i"</i>));
         });
}
</code></pre>
</div><div class="Element-dblclick-section"><h3 id="Element.dblclick" class="dr-method"><i class="dr-trixie">&#160;</i>Element.dblclick(handler)<a href="#Element.dblclick" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2817 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2817">&#x27ad;</a></h3>
<div class="extra" id="Element.dblclick-extra"></div></div><div class="dr-method"><p>Adds event handler for double click for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-drag-section"><h3 id="Element.drag" class="dr-method"><i class="dr-trixie">&#160;</i>Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext])<a href="#Element.drag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3136 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3136">&#x27ad;</a></h3>
<div class="extra" id="Element.drag-extra"></div></div><div class="dr-method"><p>Adds event handlers for drag of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">onmove</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for moving</dd>
<dt class="dr-param">onstart</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for drag start</dd>
<dt class="dr-param">onend</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for drag end</dd>
<dt class="dr-param optional">mcontext</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context for moving handler</dd>
<dt class="dr-param optional">scontext</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context for drag start handler</dd>
<dt class="dr-param optional">econtext</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context for drag end handler</dd>
</dl>
<p>Additionaly following <code>drag</code> events will be triggered: <code>drag.start.&lt;id></code> on start,
<code>drag.end.&lt;id></code> on end and <code>drag.move.&lt;id></code> on every move. When element will be dragged over another element
<code>drag.over.&lt;id></code> will be fired as well.
</p>
<p>Start event and start handler will be called in specified context or in context of the element with following parameters:
</p>
<ol class="dr-json"><li><span class="dr-json-key">x</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x position of the mouse</span>
<li><span class="dr-json-key">y</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y position of the mouse</span>
<li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
</ol>
<p>Move event and move handler will be called in specified context or in context of the element with following parameters:
</p>
<ol class="dr-json"><li><span class="dr-json-key">dx</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">shift by x from the start point</span>
<li><span class="dr-json-key">dy</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">shift by y from the start point</span>
<li><span class="dr-json-key">x</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x position of the mouse</span>
<li><span class="dr-json-key">y</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y position of the mouse</span>
<li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
</ol>
<p>End event and end handler will be called in specified context or in context of the element with following parameters:
</p>
<ol class="dr-json"><li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
</ol>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-getBBox-section"><h3 id="Element.getBBox" class="dr-method"><i class="dr-trixie">&#160;</i>Element.getBBox(isWithoutTransform)<a href="#Element.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3601 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3601">&#x27ad;</a></h3>
<div class="extra" id="Element.getBBox-extra"></div></div><div class="dr-method"><p>Return bounding box for a given element
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">isWithoutTransform</dt>
<dd class="dr-type"><em class="dr-type-boolean">boolean</em></dd>
<dd class="dr-description">flag, <code>true</code> if you want to have bounding box before transformations. Default is <code>false</code>.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Bounding box object:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">top left corner x</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">top left corner y</span>
<li><span class="dr-json-key">x2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">bottom right corner x</span>
<li><span class="dr-json-key">y2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">bottom right corner y</span>
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width</span>
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height</span>
</ol></li><li>}</li></ol>
</div><div class="Element-getPointAtLength-section"><h3 id="Element.getPointAtLength" class="dr-method"><i class="dr-trixie">&#160;</i>Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3828 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3828">&#x27ad;</a></h3>
<div class="extra" id="Element.getPointAtLength-extra"></div></div><div class="dr-method"><p>Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">length</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">representation of the point:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate</span>
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
</ol></li><li>}</li></ol>
</div><div class="Element-getSubpath-section"><h3 id="Element.getSubpath" class="dr-method"><i class="dr-trixie">&#160;</i>Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3845 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3845">&#x27ad;</a></h3>
<div class="extra" id="Element.getSubpath-extra"></div></div><div class="dr-method"><p>Return subpath of a given element from given length to given length. Only works for element of “path” type.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">from</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">position of the start of the segment</dd>
<dt class="dr-param">to</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">position of the end of the segment</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">pathstring for the segment</span></p>
</div><div class="Element-getTotalLength-section"><h3 id="Element.getTotalLength" class="dr-method"><i class="dr-trixie">&#160;</i>Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3804 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3804">&#x27ad;</a></h3>
<div class="extra" id="Element.getTotalLength-extra"></div></div><div class="dr-method"><p>Returns length of the path in pixels. Only works for element of “path” type.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length.</span></p>
</div><div class="Element-glow-section"><h3 id="Element.glow" class="dr-method"><i class="dr-trixie">&#160;</i>Element.glow([glow])<a href="#Element.glow" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3662 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3662">&#x27ad;</a></h3>
<div class="extra" id="Element.glow-extra"></div></div><div class="dr-method"><p>Return set of elements that create glow-like effect around given element. See <a href="#Paper.set" class="dr-link">Paper.set</a>.
</p>
<p>Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">glow</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">parameters object with all properties optional:</dd>
</dl>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">width</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">size of the glow, default is <code>10</code></span>
<li><span class="dr-json-key">fill</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">will it be filled, default is <code>false</code></span>
<li><span class="dr-json-key">opacity</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">opacity, default is <code>0.5</code></span>
<li><span class="dr-json-key">offsetx</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">horizontal offset, default is <code>0</code></span>
<li><span class="dr-json-key">offsety</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">vertical offset, default is <code>0</code></span>
<li><span class="dr-json-key">color</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">glow colour, default is <code>black</code></span>
</ol></li><li>}</li></ol>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Paper.set" class="dr-link">Paper.set</a> of elements that represents glow</span></p>
</div><div class="Element-hide-section"><h3 id="Element.hide" class="dr-method"><i class="dr-trixie">&#160;</i>Element.hide()<a href="#Element.hide" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 849 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L849">&#x27ad;</a></h3>
<div class="extra" id="Element.hide-extra"></div></div><div class="dr-method"><p>Makes element invisible. See <a href="#Element.show" class="dr-link">Element.show</a>.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-hover-section"><h3 id="Element.hover" class="dr-method"><i class="dr-trixie">&#160;</i>Element.hover(f_in, f_out, [icontext], [ocontext])<a href="#Element.hover" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3089 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3089">&#x27ad;</a></h3>
<div class="extra" id="Element.hover-extra"></div></div><div class="dr-method"><p>Adds event handlers for hover for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">f_in</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for hover in</dd>
<dt class="dr-param">f_out</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for hover out</dd>
<dt class="dr-param optional">icontext</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context for hover in handler</dd>
<dt class="dr-param optional">ocontext</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context for hover out handler</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-id-section"><h3 id="Element.id" class="dr-property"><i class="dr-trixie">&#160;</i>Element.id<a href="#Element.id" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 632 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L632">&#x27ad;</a></h3>
<div class="extra" id="Element.id-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-number">number</em><p>Unique id of the element. Especially usesful when you want to listen to events of the element,
because all events are fired in format <code>&lt;module>.&lt;action>.&lt;id></code>. Also useful for <a href="#Paper.getById" class="dr-link">Paper.getById</a> method.
</p>
</div><div class="Element-insertAfter-section"><h3 id="Element.insertAfter" class="dr-method"><i class="dr-trixie">&#160;</i>Element.insertAfter()<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1096 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1096">&#x27ad;</a></h3>
<div class="extra" id="Element.insertAfter-extra"></div></div><div class="dr-method"><p>Inserts current object after the given one.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-insertBefore-section"><h3 id="Element.insertBefore" class="dr-method"><i class="dr-trixie">&#160;</i>Element.insertBefore()<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1116 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1116">&#x27ad;</a></h3>
<div class="extra" id="Element.insertBefore-extra"></div></div><div class="dr-method"><p>Inserts current object before the given one.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-isPointInside-section"><h3 id="Element.isPointInside" class="dr-method"><i class="dr-trixie">&#160;</i>Element.isPointInside(x, y)<a href="#Element.isPointInside" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3578 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3578">&#x27ad;</a></h3>
<div class="extra" id="Element.isPointInside-extra"></div></div><div class="dr-method"><p>Determine if given point is inside this element’s shape
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the point</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point inside the shape</span></p>
</div><div class="Element-matrix-section"><h3 id="Element.matrix" class="dr-property"><i class="dr-trixie">&#160;</i>Element.matrix<a href="#Element.matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2253 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2253">&#x27ad;</a></h3>
<div class="extra" id="Element.matrix-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Keeps <a href="#Matrix" class="dr-link">Matrix</a> object, which represents element transformation
</p>
</div><div class="Element-mousedown-section"><h3 id="Element.mousedown" class="dr-method"><i class="dr-trixie">&#160;</i>Element.mousedown(handler)<a href="#Element.mousedown" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2836 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2836">&#x27ad;</a></h3>
<div class="extra" id="Element.mousedown-extra"></div></div><div class="dr-method"><p>Adds event handler for mousedown for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-mousemove-section"><h3 id="Element.mousemove" class="dr-method"><i class="dr-trixie">&#160;</i>Element.mousemove(handler)<a href="#Element.mousemove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2855 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2855">&#x27ad;</a></h3>
<div class="extra" id="Element.mousemove-extra"></div></div><div class="dr-method"><p>Adds event handler for mousemove for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-mouseout-section"><h3 id="Element.mouseout" class="dr-method"><i class="dr-trixie">&#160;</i>Element.mouseout(handler)<a href="#Element.mouseout" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2874 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2874">&#x27ad;</a></h3>
<div class="extra" id="Element.mouseout-extra"></div></div><div class="dr-method"><p>Adds event handler for mouseout for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-mouseover-section"><h3 id="Element.mouseover" class="dr-method"><i class="dr-trixie">&#160;</i>Element.mouseover(handler)<a href="#Element.mouseover" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2893 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2893">&#x27ad;</a></h3>
<div class="extra" id="Element.mouseover-extra"></div></div><div class="dr-method"><p>Adds event handler for mouseover for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-mouseup-section"><h3 id="Element.mouseup" class="dr-method"><i class="dr-trixie">&#160;</i>Element.mouseup(handler)<a href="#Element.mouseup" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2912 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2912">&#x27ad;</a></h3>
<div class="extra" id="Element.mouseup-extra"></div></div><div class="dr-method"><p>Adds event handler for mouseup for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-next-section"><h3 id="Element.next" class="dr-property"><i class="dr-trixie">&#160;</i>Element.next<a href="#Element.next" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 675 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L675">&#x27ad;</a></h3>
<div class="extra" id="Element.next-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Reference to the next element in the hierarchy.
</p>
</div><div class="Element-node-section"><h3 id="Element.node" class="dr-property"><i class="dr-trixie">&#160;</i>Element.node<a href="#Element.node" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 611 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L611">&#x27ad;</a></h3>
<div class="extra" id="Element.node-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
Note: Don’t mess with it.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><span class="c">// draw a circle at coordinate <span class="d">10</span>,<span class="d">10</span> <b>with</b> radius of <span class="d">10</span></span>
<b>var</b> c<span class="s"> = </span>paper.circle(<span class="d">10</span>, <span class="d">10</span>, <span class="d">10</span>);
c.node.onclick<span class="s"> = </span><b>function</b> () {
    c.attr(<i>"fill"</i>, <i>"red"</i>);
};
</code></pre>
</div><div class="Element-onDragOver-section"><h3 id="Element.onDragOver" class="dr-method"><i class="dr-trixie">&#160;</i>Element.onDragOver(f)<a href="#Element.onDragOver" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3164 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3164">&#x27ad;</a></h3>
<div class="extra" id="Element.onDragOver-extra"></div></div><div class="dr-method"><p>Shortcut for assigning event handler for <code>drag.over.&lt;id></code> event, where id is id of the element (see <a href="#Element.id" class="dr-link">Element.id</a>).
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">f</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for event, first argument would be the element you are dragging over</dd>
</dl>
</div><div class="Element-paper-section"><h3 id="Element.paper" class="dr-property"><i class="dr-trixie">&#160;</i>Element.paper<a href="#Element.paper" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 648 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L648">&#x27ad;</a></h3>
<div class="extra" id="Element.paper-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>Raphael.el.cross<span class="s"> = </span><b>function</b> () {
    <b>this</b>.attr({fill: <i>"red"</i>});
    <b>this</b>.paper.path(<i>"M10,10L50,50M50,10L10,<span class="d">50</span>"</i>)
        .attr({stroke: <i>"red"</i>});
}
</code></pre>
</div><div class="Element-pause-section"><h3 id="Element.pause" class="dr-method"><i class="dr-trixie">&#160;</i>Element.pause([anim])<a href="#Element.pause" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4577 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4577">&#x27ad;</a></h3>
<div class="extra" id="Element.pause-extra"></div></div><div class="dr-method"><p>Stops animation of the element with ability to resume it later on.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">anim</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element</span></p>
</div><div class="Element-prev-section"><h3 id="Element.prev" class="dr-property"><i class="dr-trixie">&#160;</i>Element.prev<a href="#Element.prev" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 666 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L666">&#x27ad;</a></h3>
<div class="extra" id="Element.prev-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Reference to the previous element in the hierarchy.
</p>
</div><div class="Element-raphael-section"><h3 id="Element.raphael" class="dr-property"><i class="dr-trixie">&#160;</i>Element.raphael<a href="#Element.raphael" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 624 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L624">&#x27ad;</a></h3>
<div class="extra" id="Element.raphael-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Internal reference to <a href="#Raphael" class="dr-link">Raphael</a> object. In case it is not available.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>Raphael.el.red<span class="s"> = </span><b>function</b> () {
    <b>var</b> hsb<span class="s"> = </span><b>this</b>.paper.raphael.rgb2hsb(<b>this</b>.attr(<i>"fill"</i>));
    hsb.h<span class="s"> = </span><span class="d">1</span>;
    <b>this</b>.attr({fill: <b>this</b>.paper.raphael.hsb2rgb(hsb).hex});
}
</code></pre>
</div><div class="Element-remove-section"><h3 id="Element.remove" class="dr-method"><i class="dr-trixie">&#160;</i>Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 870 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L870">&#x27ad;</a></h3>
<div class="extra" id="Element.remove-extra"></div></div><div class="dr-method"><p>Removes element from the paper.
</p>
</div><div class="Element-removeData-section"><h3 id="Element.removeData" class="dr-method"><i class="dr-trixie">&#160;</i>Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3069 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3069">&#x27ad;</a></h3>
<div class="extra" id="Element.removeData-extra"></div></div><div class="dr-method"><p>Removes value associated with an element by given key.
If key is not provided, removes all the data of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">key</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">key</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-resume-section"><h3 id="Element.resume" class="dr-method"><i class="dr-trixie">&#160;</i>Element.resume([anim])<a href="#Element.resume" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4597 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4597">&#x27ad;</a></h3>
<div class="extra" id="Element.resume-extra"></div></div><div class="dr-method"><p>Resumes animation if it was paused with <a href="#Element.pause" class="dr-link">Element.pause</a> method.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">anim</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element</span></p>
</div><div class="Element-rotate-section"><h3 id="Element.rotate" class="dr-method"><i class="dr-trixie">&#160;</i>Element.rotate(deg, [cx], [cy])<a href="#Element.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 708 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L708">&#x27ad;</a></h3>
<div class="extra" id="Element.rotate-extra"></div></div><div class="dr-method"><p>Deprecated! Use <a href="#Element.transform" class="dr-link">Element.transform</a> instead.
Adds rotation by given angle around given point to the list of
transformations of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">deg</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle in degrees</dd>
<dt class="dr-param optional">cx</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the centre of rotation</dd>
<dt class="dr-param optional">cy</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the centre of rotation</dd>
</dl>
<p>If cx <em class="amp">&amp;</em> cy aren’t specified centre of the shape is used as a point of rotation.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-scale-section"><h3 id="Element.scale" class="dr-method"><i class="dr-trixie">&#160;</i>Element.scale(sx, sy, [cx], [cy])<a href="#Element.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 742 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L742">&#x27ad;</a></h3>
<div class="extra" id="Element.scale-extra"></div></div><div class="dr-method"><p>Deprecated! Use <a href="#Element.transform" class="dr-link">Element.transform</a> instead.
Adds scale by given amount relative to given point to the list of
transformations of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">sx</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">horisontal scale amount</dd>
<dt class="dr-param">sy</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">vertical scale amount</dd>
<dt class="dr-param optional">cx</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the centre of scale</dd>
<dt class="dr-param optional">cy</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the centre of scale</dd>
</dl>
<p>If cx <em class="amp">&amp;</em> cy aren’t specified centre of the shape is used instead.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-setTime-section"><h3 id="Element.setTime" class="dr-method"><i class="dr-trixie">&#160;</i>Element.setTime(anim, value)<a href="#Element.setTime" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4510 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4510">&#x27ad;</a></h3>
<div class="extra" id="Element.setTime-extra"></div></div><div class="dr-method"><p>Sets the status of animation of the element in milliseconds. Similar to <a href="#Element.status" class="dr-link">Element.status</a> method.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">anim</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object</dd>
<dt class="dr-param">value</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number of milliseconds from the beginning of the animation</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element if <code>value</code> is specified</span></p>
<p>Note, that during animation following events are triggered:
</p>
<p>On each animation frame event <code>anim.frame.&lt;id></code>, on start <code>anim.start.&lt;id></code> and on end <code>anim.finish.&lt;id></code>.
</p>
</div><div class="Element-show-section"><h3 id="Element.show" class="dr-method"><i class="dr-trixie">&#160;</i>Element.show()<a href="#Element.show" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 860 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L860">&#x27ad;</a></h3>
<div class="extra" id="Element.show-extra"></div></div><div class="dr-method"><p>Makes element visible. See <a href="#Element.hide" class="dr-link">Element.hide</a>.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-status-section"><h3 id="Element.status" class="dr-method"><i class="dr-trixie">&#160;</i>Element.status([anim], [value])<a href="#Element.status" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4537 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4537">&#x27ad;</a></h3>
<div class="extra" id="Element.status-extra"></div></div><div class="dr-method"><p>Gets or sets the status of animation of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">anim</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object</dd>
<dt class="dr-param optional">value</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">status</span></p>
<p>or
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">status if <code>anim</code> is not specified. Array of objects in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">anim:</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">animation object</span>
<li><span class="dr-json-key">status:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">status</span>
</ol></li><li>}</li></ol>
<p>or
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element if <code>value</code> is specified</span></p>
</div><div class="Element-stop-section"><h3 id="Element.stop" class="dr-method"><i class="dr-trixie">&#160;</i>Element.stop([anim])<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4619 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4619">&#x27ad;</a></h3>
<div class="extra" id="Element.stop-extra"></div></div><div class="dr-method"><p>Stops animation of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">anim</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">animation object</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">original element</span></p>
</div><div class="Element-toBack-section"><h3 id="Element.toBack" class="dr-method"><i class="dr-trixie">&#160;</i>Element.toBack()<a href="#Element.toBack" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1075 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1075">&#x27ad;</a></h3>
<div class="extra" id="Element.toBack-extra"></div></div><div class="dr-method"><p>Moves the element so it is the furthest from the viewer’s eyes, behind other elements.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-toFront-section"><h3 id="Element.toFront" class="dr-method"><i class="dr-trixie">&#160;</i>Element.toFront()<a href="#Element.toFront" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1055 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1055">&#x27ad;</a></h3>
<div class="extra" id="Element.toFront-extra"></div></div><div class="dr-method"><p>Moves the element so it is the closest to the viewer’s eyes, on top of other elements.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-touchcancel-section"><h3 id="Element.touchcancel" class="dr-method"><i class="dr-trixie">&#160;</i>Element.touchcancel(handler)<a href="#Element.touchcancel" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2988 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2988">&#x27ad;</a></h3>
<div class="extra" id="Element.touchcancel-extra"></div></div><div class="dr-method"><p>Adds event handler for touchcancel for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-touchend-section"><h3 id="Element.touchend" class="dr-method"><i class="dr-trixie">&#160;</i>Element.touchend(handler)<a href="#Element.touchend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2969 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2969">&#x27ad;</a></h3>
<div class="extra" id="Element.touchend-extra"></div></div><div class="dr-method"><p>Adds event handler for touchend for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-touchmove-section"><h3 id="Element.touchmove" class="dr-method"><i class="dr-trixie">&#160;</i>Element.touchmove(handler)<a href="#Element.touchmove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2950 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2950">&#x27ad;</a></h3>
<div class="extra" id="Element.touchmove-extra"></div></div><div class="dr-method"><p>Adds event handler for touchmove for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-touchstart-section"><h3 id="Element.touchstart" class="dr-method"><i class="dr-trixie">&#160;</i>Element.touchstart(handler)<a href="#Element.touchstart" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2931 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2931">&#x27ad;</a></h3>
<div class="extra" id="Element.touchstart-extra"></div></div><div class="dr-method"><p>Adds event handler for touchstart for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-transform-section"><h3 id="Element.transform" class="dr-method"><i class="dr-trixie">&#160;</i>Element.transform([tstr])<a href="#Element.transform" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 824 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L824">&#x27ad;</a></h3>
<div class="extra" id="Element.transform-extra"></div></div><div class="dr-method"><p>Adds transformation to the element which is separate to other attributes,
i.e. translation doesn’t change <code>x</code> or <code>y</code> of the rectange. The format
of transformation string is similar to the path string syntax:
</p>
<pre class="javascript code"><code><i>"t100,100r30,<span class="d">100</span>,100s2,<span class="d">2</span>,<span class="d">100</span>,100r45s1<span class="d">.5</span>"</i>
</code></pre>
<p>Each letter is a command. There are four commands: <code>t</code> is for translate, <code>r</code> is for rotate, <code>s</code> is for
scale and <code>m</code> is for matrix.
</p>
<p>There are also alternative “absolute” translation, rotation and scale: <code>T</code>, <code>R</code> and <code>S</code>. They will not take previous transformation into account. For example, <code>...T100,0</code> will always move element 100 px horisontally, while <code>...t100,0</code> could move it vertically if there is <code>r90</code> before. Just compare results of <code>r90t100,0</code> and <code>r90T100,0</code>.
</p>
<p>So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;
rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin
coordinates as optional parameters, the default is the centre point of the element.
Matrix accepts six parameters.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> el<span class="s"> = </span>paper.rect(<span class="d">10</span>, <span class="d">20</span>, <span class="d">300</span>, <span class="d">200</span>);
<span class="c">// translate <span class="d">100</span>, <span class="d">100</span>, rotate <span class="d">45</span>°, translate -<span class="d">100</span>, <span class="d">0</span></span>
el.transform(<i>"t100,100r45t-<span class="d">100</span>,<span class="d">0</span>"</i>);
<span class="c">// <b>if</b> you want you can append or prepend transformations</span>
el.transform(<i>"...t50,<span class="d">50</span>"</i>);
el.transform(<i>"s2..."</i>);
<span class="c">// or even wrap</span>
el.transform(<i>"t50,<span class="d">50</span>...t-<span class="d">50</span>-<span class="d">50</span>"</i>);
<span class="c">// to reset transformation call method <b>with</b> empty string</span>
el.transform(<i>""</i>);
<span class="c">// to get current value call it without parameters</span>
console.log(el.transform());
</code></pre>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">tstr</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">transformation string</dd>
</dl>
<p>If tstr isn’t specified
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">current transformation string</span></p>
<p>else
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-translate-section"><h3 id="Element.translate" class="dr-method"><i class="dr-trixie">&#160;</i>Element.translate(dx, dy)<a href="#Element.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 774 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L774">&#x27ad;</a></h3>
<div class="extra" id="Element.translate-extra"></div></div><div class="dr-method"><p>Deprecated! Use <a href="#Element.transform" class="dr-link">Element.transform</a> instead.
Adds translation by given amount to the list of transformations of the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">dx</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">horisontal shift</dd>
<dt class="dr-param">dy</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">vertical shift</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unclick-section"><h3 id="Element.unclick" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unclick(handler)<a href="#Element.unclick" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2807 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2807">&#x27ad;</a></h3>
<div class="extra" id="Element.unclick-extra"></div></div><div class="dr-method"><p>Removes event handler for click for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-undblclick-section"><h3 id="Element.undblclick" class="dr-method"><i class="dr-trixie">&#160;</i>Element.undblclick(handler)<a href="#Element.undblclick" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2826 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2826">&#x27ad;</a></h3>
<div class="extra" id="Element.undblclick-extra"></div></div><div class="dr-method"><p>Removes event handler for double click for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-undrag-section"><h3 id="Element.undrag" class="dr-method"><i class="dr-trixie">&#160;</i>Element.undrag()<a href="#Element.undrag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3173 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3173">&#x27ad;</a></h3>
<div class="extra" id="Element.undrag-extra"></div></div><div class="dr-method"><p>Removes all drag event handlers from given element.
</p>
</div><div class="Element-unhover-section"><h3 id="Element.unhover" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unhover(f_in, f_out)<a href="#Element.unhover" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3102 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3102">&#x27ad;</a></h3>
<div class="extra" id="Element.unhover-extra"></div></div><div class="dr-method"><p>Removes event handlers for hover for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">f_in</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for hover in</dd>
<dt class="dr-param">f_out</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for hover out</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unmousedown-section"><h3 id="Element.unmousedown" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unmousedown(handler)<a href="#Element.unmousedown" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2845 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2845">&#x27ad;</a></h3>
<div class="extra" id="Element.unmousedown-extra"></div></div><div class="dr-method"><p>Removes event handler for mousedown for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unmousemove-section"><h3 id="Element.unmousemove" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unmousemove(handler)<a href="#Element.unmousemove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2864 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2864">&#x27ad;</a></h3>
<div class="extra" id="Element.unmousemove-extra"></div></div><div class="dr-method"><p>Removes event handler for mousemove for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unmouseout-section"><h3 id="Element.unmouseout" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unmouseout(handler)<a href="#Element.unmouseout" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2883 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2883">&#x27ad;</a></h3>
<div class="extra" id="Element.unmouseout-extra"></div></div><div class="dr-method"><p>Removes event handler for mouseout for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unmouseover-section"><h3 id="Element.unmouseover" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unmouseover(handler)<a href="#Element.unmouseover" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2902 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2902">&#x27ad;</a></h3>
<div class="extra" id="Element.unmouseover-extra"></div></div><div class="dr-method"><p>Removes event handler for mouseover for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-unmouseup-section"><h3 id="Element.unmouseup" class="dr-method"><i class="dr-trixie">&#160;</i>Element.unmouseup(handler)<a href="#Element.unmouseup" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2921 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2921">&#x27ad;</a></h3>
<div class="extra" id="Element.unmouseup-extra"></div></div><div class="dr-method"><p>Removes event handler for mouseup for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-untouchcancel-section"><h3 id="Element.untouchcancel" class="dr-method"><i class="dr-trixie">&#160;</i>Element.untouchcancel(handler)<a href="#Element.untouchcancel" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2997 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2997">&#x27ad;</a></h3>
<div class="extra" id="Element.untouchcancel-extra"></div></div><div class="dr-method"><p>Removes event handler for touchcancel for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-untouchend-section"><h3 id="Element.untouchend" class="dr-method"><i class="dr-trixie">&#160;</i>Element.untouchend(handler)<a href="#Element.untouchend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2978 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2978">&#x27ad;</a></h3>
<div class="extra" id="Element.untouchend-extra"></div></div><div class="dr-method"><p>Removes event handler for touchend for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-untouchmove-section"><h3 id="Element.untouchmove" class="dr-method"><i class="dr-trixie">&#160;</i>Element.untouchmove(handler)<a href="#Element.untouchmove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2959 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2959">&#x27ad;</a></h3>
<div class="extra" id="Element.untouchmove-extra"></div></div><div class="dr-method"><p>Removes event handler for touchmove for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Element-untouchstart-section"><h3 id="Element.untouchstart" class="dr-method"><i class="dr-trixie">&#160;</i>Element.untouchstart(handler)<a href="#Element.untouchstart" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2940 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2940">&#x27ad;</a></h3>
<div class="extra" id="Element.untouchstart-extra"></div></div><div class="dr-method"><p>Removes event handler for touchstart for the element.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">handler</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">handler for the event</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div><div class="Matrix-section"><h2 id="Matrix" class="undefined"><i class="dr-trixie">&#160;</i>Matrix<a href="#Matrix" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Matrix-extra"></div></div><div class="Matrix-add-section"><h3 id="Matrix.add" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.add(a, b, c, d, e, f, matrix)<a href="#Matrix.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2423 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2423">&#x27ad;</a></h3>
<div class="extra" id="Matrix.add-extra"></div></div><div class="dr-method"><p>Adds given matrix to existing one.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">a</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">c</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">d</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">e</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">f</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">matrix</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></dd>
</dl>
</div><div class="Matrix-clone-section"><h3 id="Matrix.clone" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2468 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2468">&#x27ad;</a></h3>
<div class="extra" id="Matrix.clone-extra"></div></div><div class="dr-method"><p>Returns copy of the matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div><div class="Matrix-invert-section"><h3 id="Matrix.invert" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2456 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2456">&#x27ad;</a></h3>
<div class="extra" id="Matrix.invert-extra"></div></div><div class="dr-method"><p>Returns inverted version of the matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div><div class="Matrix-rotate-section"><h3 id="Matrix.rotate" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2510 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2510">&#x27ad;</a></h3>
<div class="extra" id="Matrix.rotate-extra"></div></div><div class="dr-method"><p>Rotates the matrix
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">a</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
</div><div class="Matrix-scale-section"><h3 id="Matrix.scale" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2494 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2494">&#x27ad;</a></h3>
<div class="extra" id="Matrix.scale-extra"></div></div><div class="dr-method"><p>Scales the matrix
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param optional">y</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param optional">cx</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param optional">cy</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
</div><div class="Matrix-split-section"><h3 id="Matrix.split" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2583 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2583">&#x27ad;</a></h3>
<div class="extra" id="Matrix.split-extra"></div></div><div class="dr-method"><p>Splits matrix into primitive transformations
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
<ol class="dr-json"><li><span class="dr-json-key">dx</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">translation by x</span>
<li><span class="dr-json-key">dy</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">translation by y</span>
<li><span class="dr-json-key">scalex</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">scale by x</span>
<li><span class="dr-json-key">scaley</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">scale by y</span>
<li><span class="dr-json-key">shear</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">shear</span>
<li><span class="dr-json-key">rotate</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">rotation in deg</span>
<li><span class="dr-json-key">isSimple</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">could it be represented via simple transformations</span>
</ol>
</div><div class="Matrix-toTransformString-section"><h3 id="Matrix.toTransformString" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2625 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2625">&#x27ad;</a></h3>
<div class="extra" id="Matrix.toTransformString-extra"></div></div><div class="dr-method"><p>Return transform string that represents given matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transform string</span></p>
</div><div class="Matrix-translate-section"><h3 id="Matrix.translate" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2480 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2480">&#x27ad;</a></h3>
<div class="extra" id="Matrix.translate-extra"></div></div><div class="dr-method"><p>Translate the matrix
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
</div><div class="Matrix-x-section"><h3 id="Matrix.x" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2529 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2529">&#x27ad;</a></h3>
<div class="extra" id="Matrix.x-extra"></div></div><div class="dr-method"><p>Return x coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.y" class="dr-link">Matrix.y</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">x</span></p>
</div><div class="Matrix-y-section"><h3 id="Matrix.y" class="dr-method"><i class="dr-trixie">&#160;</i>Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2542 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2542">&#x27ad;</a></h3>
<div class="extra" id="Matrix.y-extra"></div></div><div class="dr-method"><p>Return y coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.x" class="dr-link">Matrix.x</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">y</span></p>
</div><div class="Paper-section"><h2 id="Paper" class="undefined"><i class="dr-trixie">&#160;</i>Paper<a href="#Paper" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Paper-extra"></div></div><div class="Paper-add-section"><h3 id="Paper.add" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.add(json)<a href="#Paper.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 5044 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L5044">&#x27ad;</a></h3>
<div class="extra" id="Paper.add-extra"></div></div><div class="dr-method"><p>Imports elements in JSON array in format <code>{type: type, &lt;attributes>}</code>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">json</dt>
<dd class="dr-type"><em class="dr-type-array">array</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">resulting set of imported elements</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.add([
    {
        type: <i>"circle"</i>,
        cx: <span class="d">10</span>,
        cy: <span class="d">10</span>,
        r: <span class="d">5</span>
    },
    {
        type: <i>"rect"</i>,
        x: <span class="d">10</span>,
        y: <span class="d">10</span>,
        width: <span class="d">10</span>,
        height: <span class="d">10</span>,
        fill: <i>"#fc0"</i>
    }
]);
</code></pre>
</div><div class="Paper-bottom-section"><h3 id="Paper.bottom" class="dr-property"><i class="dr-trixie">&#160;</i>Paper.bottom<a href="#Paper.bottom" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3430 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3430">&#x27ad;</a></h3>
<div class="extra" id="Paper.bottom-extra"></div></div><div class="dr-property"><p>Points to the bottom element on the paper
</p>
</div><div class="Paper-ca-section"><h3 id="Paper.ca" class="dr-property"><i class="dr-trixie">&#160;</i>Paper.ca<a href="#Paper.ca" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 99 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L99">&#x27ad;</a></h3>
<div class="extra" id="Paper.ca-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>Shortcut for <a href="#Paper.customAttributes" class="dr-link">Paper.customAttributes</a>
</p>
</div><div class="Paper-circle-section"><h3 id="Paper.circle" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3198 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3198">&#x27ad;</a></h3>
<div class="extra" id="Paper.circle-extra"></div></div><div class="dr-method"><p>Draws a circle.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the centre</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the centre</dd>
<dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">radius</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type “circle”</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> c<span class="s"> = </span>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">40</span>);
</code></pre>
</div><div class="Paper-clear-section"><h3 id="Paper.clear" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1325 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1325">&#x27ad;</a></h3>
<div class="extra" id="Paper.clear-extra"></div></div><div class="dr-method"><p>Clears the paper, i.e. removes all the elements.
</p>
</div><div class="Paper-customAttributes-section"><h3 id="Paper.customAttributes" class="dr-property"><i class="dr-trixie">&#160;</i>Paper.customAttributes<a href="#Paper.customAttributes" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 125 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L125">&#x27ad;</a></h3>
<div class="extra" id="Paper.customAttributes-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>If you have a set of attributes that you would like to represent
as a function of some number you can do it easily with custom attributes:
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.customAttributes.hue<span class="s"> = </span><b>function</b> (num) {
    num<span class="s"> = </span>num<span class="s"> % </span><span class="d">1</span>;
    <b>return</b> {fill: <i>"hsb("</i><span class="s"> + </span>num<span class="s"> + </span><i>", <span class="d">0.75</span>, <span class="d">1</span>)"</i>};
};
<span class="c">// Custom attribute “hue” will change fill</span>
<span class="c">// to be given hue <b>with</b> fixed saturation and brightness.</span>
<span class="c">// Now you can use it like <b>this</b>:</span>
<b>var</b> c<span class="s"> = </span>paper.circle(<span class="d">10</span>, <span class="d">10</span>, <span class="d">10</span>).attr({hue: <span class="d">.45</span>});
<span class="c">// or even like <b>this</b>:</span>
c.animate({hue: <span class="d">1</span>}, <span class="d">1e3</span>);

<span class="c">// You could also create custom attribute</span>
<span class="c">// <b>with</b> multiple parameters:</span>
paper.customAttributes.hsb<span class="s"> = </span><b>function</b> (h, s, b) {
    <b>return</b> {fill: <i>"hsb("</i><span class="s"> + </span>[h, s, b].join(<i>","</i>)<span class="s"> + </span><i>")"</i>};
};
c.attr({hsb: <i>"<span class="d">0.5</span> <span class="d">.8</span> <span class="d">1</span>"</i>});
c.animate({hsb: [<span class="d">1</span>, <span class="d">0</span>, <span class="d">0.5</span>]}, <span class="d">1e3</span>);
</code></pre>
</div><div class="Paper-ellipse-section"><h3 id="Paper.ellipse" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3246 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3246">&#x27ad;</a></h3>
<div class="extra" id="Paper.ellipse-extra"></div></div><div class="dr-method"><p>Draws an ellipse.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the centre</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the centre</dd>
<dt class="dr-param">rx</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">horizontal radius</dd>
<dt class="dr-param">ry</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">vertical radius</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type “ellipse”</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> c<span class="s"> = </span>paper.ellipse(<span class="d">50</span>, <span class="d">50</span>, <span class="d">40</span>, <span class="d">20</span>);
</code></pre>
</div><div class="Paper-forEach-section"><h3 id="Paper.forEach" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.forEach(callback, thisArg)<a href="#Paper.forEach" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3529 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3529">&#x27ad;</a></h3>
<div class="extra" id="Paper.forEach-extra"></div></div><div class="dr-method"><p>Executes given function for each element on the paper
</p>
<p>If callback function returns <code>false</code> it will stop loop running.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">callback</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">function to run</dd>
<dt class="dr-param">thisArg</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">context object for the callback</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Paper object</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.forEach(<b>function</b> (el) {
    el.attr({ stroke: <i>"blue"</i> });
});
</code></pre>
</div><div class="Paper-getById-section"><h3 id="Paper.getById" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.getById(id)<a href="#Paper.getById" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3501 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3501">&#x27ad;</a></h3>
<div class="extra" id="Paper.getById-extra"></div></div><div class="dr-method"><p>Returns you element by its internal ID.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">id</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">id</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object</span></p>
</div><div class="Paper-getElementByPoint-section"><h3 id="Paper.getElementByPoint" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.getElementByPoint(x, y)<a href="#Paper.getElementByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3465 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3465">&#x27ad;</a></h3>
<div class="extra" id="Paper.getElementByPoint-extra"></div></div><div class="dr-method"><p>Returns you topmost element under given point.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object</span></p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate from the top left corner of the window</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate from the top left corner of the window</dd>
</dl>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.getElementByPoint(mouseX, mouseY).attr({stroke: <i>"#f00"</i>});
</code></pre>
</div><div class="Paper-getElementsByPoint-section"><h3 id="Paper.getElementsByPoint" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.getElementsByPoint(x, y)<a href="#Paper.getElementsByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3551 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3551">&#x27ad;</a></h3>
<div class="extra" id="Paper.getElementsByPoint-extra"></div></div><div class="dr-method"><p>Returns set of elements that have common point inside
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the point</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Set" class="dr-link">Set</a></span></p>
</div><div class="Paper-getFont-section"><h3 id="Paper.getFont" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.getFont(family, [weight], [style], [stretch])<a href="#Paper.getFont" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4929 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4929">&#x27ad;</a></h3>
<div class="extra" id="Paper.getFont-extra"></div></div><div class="dr-method"><p>Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">family</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">font family name or any word from it</dd>
<dt class="dr-param optional">weight</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">font weight</dd>
<dt class="dr-param optional">style</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">font style</dd>
<dt class="dr-param optional">stretch</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">font stretch</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the font object</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.print(<span class="d">100</span>, <span class="d">100</span>, <i>"Test string"</i>, paper.getFont(<i>"Times"</i>, <span class="d">800</span>), <span class="d">30</span>);
</code></pre>
</div><div class="Paper-image-section"><h3 id="Paper.image" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3307 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3307">&#x27ad;</a></h3>
<div class="extra" id="Paper.image-extra"></div></div><div class="dr-method"><p>Embeds an image into the surface.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">src</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">URI of the source image</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate position</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate position</dd>
<dt class="dr-param">width</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">width of the image</dd>
<dt class="dr-param">height</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">height of the image</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type “image”</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> c<span class="s"> = </span>paper.image(<i>"apple.png"</i>, <span class="d">10</span>, <span class="d">10</span>, <span class="d">80</span>, <span class="d">80</span>);
</code></pre>
</div><div class="Paper-path-section"><h3 id="Paper.path" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3283 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3283">&#x27ad;</a></h3>
<div class="extra" id="Paper.path-extra"></div></div><div class="dr-method"><p>Creates a path element by given path data string.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">pathString</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string in SVG format.</dd>
</dl>
<p>Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:
</p>
<pre class="javascript code"><code><i>"M10,20L30,<span class="d">40</span>"</i>
</code></pre>
<p>Here we can see two commands: “M”, with arguments <code>(10, 20)</code> and “L” with arguments <code>(30, 40)</code>. Upper case letter mean command is absolute, lower case—relative.
</p>
<p></p>
<p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p>
<table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>
<tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>
<tr><td>Z</td><td>closepath</td><td>(none)</td></tr>
<tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>
<tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>
<tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>
<tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>
<tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>
<tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>
<tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>
<tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>
<tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>
<p>* “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.
Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> c<span class="s"> = </span>paper.path(<i>"M10 10L90 <span class="d">90</span>"</i>);
<span class="c">// draw a diagonal line:</span>
<span class="c">// move to <span class="d">10</span>,<span class="d">10</span>, line to <span class="d">90</span>,<span class="d">90</span></span>
</code></pre>
<p>For example of path strings, check out these icons: <a href="http://raphaeljs.com/icons/" rel="external">http://raphaeljs.com/icons/</a>
</p>
</div><div class="Paper-print-section"><h3 id="Paper.print" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.print(x, y, string, font, [size], [origin], [letter_spacing])<a href="#Paper.print" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4977 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4977">&#x27ad;</a></h3>
<div class="extra" id="Paper.print-extra"></div></div><div class="dr-method"><p>Creates path that represent given text written using given font at given position with given size.
Result of the method is path element that contains whole text as a separate path.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x position of the text</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y position of the text</dd>
<dt class="dr-param">string</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to print</dd>
<dt class="dr-param">font</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">font object, see <a href="#Paper.getFont" class="dr-link">Paper.getFont</a></dd>
<dt class="dr-param optional">size</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">size of the font, default is <code>16</code></dd>
<dt class="dr-param optional">origin</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">could be <code>"baseline"</code> or <code>"middle"</code>, default is <code>"middle"</code></dd>
<dt class="dr-param optional">letter_spacing</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number in range <code>-1..1</code>, default is <code>0</code></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">resulting path element, which consist of all letters</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> txt<span class="s"> = </span>r.print(<span class="d">10</span>, <span class="d">50</span>, <i>"print"</i>, r.getFont(<i>"Museo"</i>), <span class="d">30</span>).attr({fill: <i>"#fff"</i>});
</code></pre>
</div><div class="Paper-raphael-section"><h3 id="Paper.raphael" class="dr-property"><i class="dr-trixie">&#160;</i>Paper.raphael<a href="#Paper.raphael" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3437 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3437">&#x27ad;</a></h3>
<div class="extra" id="Paper.raphael-extra"></div></div><div class="dr-property"><p>Points to the <a href="#Raphael" class="dr-link">Raphael</a> object/function
</p>
</div><div class="Paper-rect-section"><h3 id="Paper.rect" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.rect(x, y, width, height, [r])<a href="#Paper.rect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3224 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3224">&#x27ad;</a></h3>
<div class="extra" id="Paper.rect-extra"></div></div><div class="dr-method"><p></p>
<p>Draws a rectangle.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the top left corner</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the top left corner</dd>
<dt class="dr-param">width</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">width</dd>
<dt class="dr-param">height</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">height</dd>
<dt class="dr-param optional">r</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">radius for rounded corners, default is 0</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type “rect”</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><span class="c">// regular rectangle</span>
<b>var</b> c<span class="s"> = </span>paper.rect(<span class="d">10</span>, <span class="d">10</span>, <span class="d">50</span>, <span class="d">50</span>);
<span class="c">// rectangle <b>with</b> rounded corners</span>
<b>var</b> c<span class="s"> = </span>paper.rect(<span class="d">40</span>, <span class="d">40</span>, <span class="d">50</span>, <span class="d">50</span>, <span class="d">10</span>);
</code></pre>
</div><div class="Paper-remove-section"><h3 id="Paper.remove" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.remove()<a href="#Paper.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1342 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1342">&#x27ad;</a></h3>
<div class="extra" id="Paper.remove-extra"></div></div><div class="dr-method"><p>Removes the paper from the DOM.
</p>
</div><div class="Paper-renderfix-section"><h3 id="Paper.renderfix" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.renderfix()<a href="#Paper.renderfix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1297 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.svg.js#L1297">&#x27ad;</a></h3>
<div class="extra" id="Paper.renderfix-extra"></div></div><div class="dr-method"><p>Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant
on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.
This method fixes the issue.
</p>
</div><div class="Paper-safari-section"><h3 id="Paper.safari" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.safari()<a href="#Paper.safari" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2652 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2652">&#x27ad;</a></h3>
<div class="extra" id="Paper.safari-extra"></div></div><div class="dr-method"><p>There is an inconvenient rendering bug in Safari (WebKit):
sometimes the rendering should be forced.
This method should help with dealing with this bug.
</p>
</div><div class="Paper-set-section"><h3 id="Paper.set" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.set()<a href="#Paper.set" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3350 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3350">&#x27ad;</a></h3>
<div class="extra" id="Paper.set-extra"></div></div><div class="dr-method"><p>Creates array-like object to keep and operate several elements at once.
Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.
Sets act as pseudo elements — all methods available to an element can be used on a set.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">array-like object that represents set of elements</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> st<span class="s"> = </span>paper.set();
st.push(
    paper.circle(<span class="d">10</span>, <span class="d">10</span>, <span class="d">5</span>),
    paper.circle(<span class="d">30</span>, <span class="d">10</span>, <span class="d">5</span>)
);
st.attr({fill: <i>"red"</i>}); <span class="c">// changes the fill of both circles</span>
</code></pre>
</div><div class="Paper-setFinish-section"><h3 id="Paper.setFinish" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.setFinish()<a href="#Paper.setFinish" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3381 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3381">&#x27ad;</a></h3>
<div class="extra" id="Paper.setFinish-extra"></div></div><div class="dr-method"><p>See <a href="#Paper.setStart" class="dr-link">Paper.setStart</a>. This method finishes catching and returns resulting set.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set</span></p>
</div><div class="Paper-setSize-section"><h3 id="Paper.setSize" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.setSize(width, height)<a href="#Paper.setSize" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3397 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3397">&#x27ad;</a></h3>
<div class="extra" id="Paper.setSize-extra"></div></div><div class="dr-method"><p>If you need to change dimensions of the canvas call this method
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">width</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new width of the canvas</dd>
<dt class="dr-param">height</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new height of the canvas</dd>
</dl>
</div><div class="Paper-setStart-section"><h3 id="Paper.setStart" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.setStart()<a href="#Paper.setStart" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3370 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3370">&#x27ad;</a></h3>
<div class="extra" id="Paper.setStart-extra"></div></div><div class="dr-method"><p>Creates <a href="#Paper.set" class="dr-link">Paper.set</a>. All elements that will be created after calling this method and before calling
<a href="#Paper.setFinish" class="dr-link">Paper.setFinish</a> will be added to the set.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.setStart();
paper.circle(<span class="d">10</span>, <span class="d">10</span>, <span class="d">5</span>),
paper.circle(<span class="d">30</span>, <span class="d">10</span>, <span class="d">5</span>)
<b>var</b> st<span class="s"> = </span>paper.setFinish();
st.attr({fill: <i>"red"</i>}); <span class="c">// changes the fill of both circles</span>
</code></pre>
</div><div class="Paper-setViewBox-section"><h3 id="Paper.setViewBox" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.setViewBox(x, y, w, h, fit)<a href="#Paper.setViewBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3415 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3415">&#x27ad;</a></h3>
<div class="extra" id="Paper.setViewBox-extra"></div></div><div class="dr-method"><p>Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by
specifying new boundaries.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new x position, default is <code>0</code></dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new y position, default is <code>0</code></dd>
<dt class="dr-param">w</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new width of the canvas</dd>
<dt class="dr-param">h</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">new height of the canvas</dd>
<dt class="dr-param">fit</dt>
<dd class="dr-type"><em class="dr-type-boolean">boolean</em></dd>
<dd class="dr-description"><code>true</code> if you want graphics to fit into new boundary box</dd>
</dl>
</div><div class="Paper-text-section"><h3 id="Paper.text" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3328 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3328">&#x27ad;</a></h3>
<div class="extra" id="Paper.text-extra"></div></div><div class="dr-method"><p>Draws a text string. If you need line breaks, put “\n” in the string.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate position</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate position</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">The text string to draw</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type “text”</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> t<span class="s"> = </span>paper.text(<span class="d">50</span>, <span class="d">50</span>, <i>"Raphaël\nkicks\nbutt!"</i>);
</code></pre>
</div><div class="Paper-top-section"><h3 id="Paper.top" class="dr-property"><i class="dr-trixie">&#160;</i>Paper.top<a href="#Paper.top" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3424 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3424">&#x27ad;</a></h3>
<div class="extra" id="Paper.top-extra"></div></div><div class="dr-property"><p>Points to the topmost element on the paper
</p>
</div><div class="Raphael-section"><h2 id="Raphael" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael(…)<a href="#Raphael" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 59 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L59">&#x27ad;</a></h2>
<div class="extra" id="Raphael-extra"></div></div><div class="dr-method"><p>Creates a canvas object on which to draw.
You must do this first, as all future calls to drawing methods
from this instance will be bound to this canvas.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">container</dt>
<dd class="dr-type"><em class="dr-type-HTMLElement">HTMLElement</em> <em class="dr-type-string">string</em></dd>
<dd class="dr-description">DOM element or its ID which is going to be a parent for drawing surface</dd>
<dt class="dr-param">width</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">height</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function which is going to be executed in the context of newly created paper</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">width</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">height</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function which is going to be executed in the context of newly created paper</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">all</dt>
<dd class="dr-type"><em class="dr-type-array">array</em></dd>
<dd class="dr-description">(first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, &lt;attributes>}). See <a href="#Paper.add" class="dr-link">Paper.add</a>.</dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function which is going to be executed in the context of newly created paper</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">onReadyCallback</dt>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns <code>undefined</code>.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Paper" class="dr-link">Paper</a></span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><span class="c">// Each of the following examples create a canvas</span>
<span class="c">// that is 320px wide by 200px high.</span>
<span class="c">// Canvas is created at the viewport’s <span class="d">10</span>,<span class="d">50</span> coordinate.</span>
<b>var</b> paper<span class="s"> = </span>Raphael(<span class="d">10</span>, <span class="d">50</span>, <span class="d">320</span>, <span class="d">200</span>);
<span class="c">// Canvas is created at the top left corner of the #notepad element</span>
<span class="c">// (or its top right corner <b>in</b> dir=<i>"rtl"</i> elements)</span>
<b>var</b> paper<span class="s"> = </span>Raphael(document.getElementById(<i>"notepad"</i>), <span class="d">320</span>, <span class="d">200</span>);
<span class="c">// Same as above</span>
<b>var</b> paper<span class="s"> = </span>Raphael(<i>"notepad"</i>, <span class="d">320</span>, <span class="d">200</span>);
<span class="c">// Image dump</span>
<b>var</b> set<span class="s"> = </span>Raphael([<i>"notepad"</i>, <span class="d">320</span>, <span class="d">200</span>, {
    type: <i>"rect"</i>,
    x: <span class="d">10</span>,
    y: <span class="d">10</span>,
    width: <span class="d">25</span>,
    height: <span class="d">25</span>,
    stroke: <i>"#f00"</i>
}, {
    type: <i>"text"</i>,
    x: <span class="d">30</span>,
    y: <span class="d">40</span>,
    text: <i>"Dump"</i>
}]);
</code></pre>
</div><div class="Raphael-angle-section"><h3 id="Raphael.angle" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Raphael.angle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 424 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L424">&#x27ad;</a></h3>
<div class="extra" id="Raphael.angle-extra"></div></div><div class="dr-method"><p>Returns angle between two or three points
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x1</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coord of first point</dd>
<dt class="dr-param">y1</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coord of first point</dd>
<dt class="dr-param">x2</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coord of second point</dd>
<dt class="dr-param">y2</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coord of second point</dd>
<dt class="dr-param optional">x3</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coord of third point</dd>
<dt class="dr-param optional">y3</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coord of third point</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in degrees.</span></p>
</div><div class="Raphael-animation-section"><h3 id="Raphael.animation" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.animation(params, ms, [easing], [callback])<a href="#Raphael.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4442 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4442">&#x27ad;</a></h3>
<div class="extra" id="Raphael.animation-extra"></div></div><div class="dr-method"><p>Creates an animation object that can be passed to the <a href="#Element.animate" class="dr-link">Element.animate</a> or <a href="#Element.animateWith" class="dr-link">Element.animateWith</a> methods.
See also <a href="#Animation.delay" class="dr-link">Animation.delay</a> and <a href="#Animation.repeat" class="dr-link">Animation.repeat</a> methods.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">params</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">final attributes for the element, see also <a href="#Element.attr" class="dr-link">Element.attr</a></dd>
<dt class="dr-param">ms</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">number of milliseconds for animation to run</dd>
<dt class="dr-param optional">easing</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">easing type. Accept one of <a href="#Raphael.easing_formulas" class="dr-link">Raphael.easing_formulas</a> or CSS format: <code>cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)</code></dd>
<dt class="dr-param optional">callback</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-function">function</em></dd>
<dd class="dr-description">callback function. Will be called at the end of animation.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Animation" class="dr-link">Animation</a></span></p>
</div><div class="Raphael-bezierBBox-section"><h3 id="Raphael.bezierBBox" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.bezierBBox(…)<a href="#Raphael.bezierBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1258 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1258">&#x27ad;</a></h3>
<div class="extra" id="Raphael.bezierBBox-extra"></div></div><div class="dr-method"><p>Utility method
Return bounding box of a given cubic bezier curve
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">p1x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the first point of the curve</dd>
<dt class="dr-param">p1y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the first point of the curve</dd>
<dt class="dr-param">c1x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the first anchor of the curve</dd>
<dt class="dr-param">c1y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the first anchor of the curve</dd>
<dt class="dr-param">c2x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the second anchor of the curve</dd>
<dt class="dr-param">c2y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the second anchor of the curve</dd>
<dt class="dr-param">p2x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the second point of the curve</dd>
<dt class="dr-param">p2y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the second point of the curve</dd>
</dl>
<p>or
</p>
<dl class="dr-parameters"><dt class="dr-param">bez</dt>
<dd class="dr-type"><em class="dr-type-array">array</em></dd>
<dd class="dr-description">array of six points for bezier curve</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">point information in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li> min: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the left point</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the top point</span>
</ol></li><li> }</li><li> max: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right point</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the bottom point</span>
</ol></li><li> }</li></ol></li><li>}</li></ol>
</div><div class="Raphael-color-section"><h3 id="Raphael.color" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.color(clr)<a href="#Raphael.color" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 623 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L623">&#x27ad;</a></h3>
<div class="extra" id="Raphael.color-extra"></div></div><div class="dr-method"><p>Parses the color string and returns object with all values for the given color.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">clr</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">color string in one of the supported formats (see <a href="#Raphael.getRGB" class="dr-link">Raphael.getRGB</a>)</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Combined RGB <em class="amp">&amp;</em> HSB object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">r</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">red,</span>
<li><span class="dr-json-key">g</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">green,</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••,</span>
<li><span class="dr-json-key">error</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description"><code>true</code> if string can’t be parsed,</span>
<li><span class="dr-json-key">h</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">hue,</span>
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
<li><span class="dr-json-key">v</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">value (brightness),</span>
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">lightness</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-createUUID-section"><h3 id="Raphael.createUUID" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.createUUID()<a href="#Raphael.createUUID" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 497 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L497">&#x27ad;</a></h3>
<div class="extra" id="Raphael.createUUID-extra"></div></div><div class="dr-method"><p>Returns RFC4122, version 4 ID
</p>
</div><div class="Raphael-deg-section"><h3 id="Raphael.deg" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.deg(deg)<a href="#Raphael.deg" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 457 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L457">&#x27ad;</a></h3>
<div class="extra" id="Raphael.deg-extra"></div></div><div class="dr-method"><p>Transform angle to degrees
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">deg</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle in radians</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in degrees.</span></p>
</div><div class="Raphael-easing_formulas-section"><h3 id="Raphael.easing_formulas" class="dr-property"><i class="dr-trixie">&#160;</i>Raphael.easing_formulas<a href="#Raphael.easing_formulas" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3866 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3866">&#x27ad;</a></h3>
<div class="extra" id="Raphael.easing_formulas-extra"></div></div><div class="dr-property"><p>Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:
</p>
<ul>
    <li>“linear”</li>
    <li>&lt;” or “easeIn” or “ease-in”</li>
    <li>“>” or “easeOut” or “ease-out”</li>
    <li>&lt;>” or “easeInOut” or “ease-in-out”</li>
    <li>“backIn” or “back-in”</li>
    <li>“backOut” or “back-out”</li>
    <li>“elastic”</li>
    <li>“bounce”</li>
</ul>
<p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p>
</div><div class="Raphael-el-section"><h3 id="Raphael.el" class="dr-property"><i class="dr-trixie">&#160;</i>Raphael.el<a href="#Raphael.el" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2788 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2788">&#x27ad;</a></h3>
<div class="extra" id="Raphael.el-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>You can add your own method to elements. This is usefull when you want to hack default functionality or
want to wrap some common transformation or attributes in one method. In difference to canvas methods,
you can redefine element method at any time. Expending element methods wouldn’t affect set.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>Raphael.el.red<span class="s"> = </span><b>function</b> () {
    <b>this</b>.attr({fill: <i>"#f00"</i>});
};
<span class="c">// then use it</span>
paper.circle(<span class="d">100</span>, <span class="d">100</span>, <span class="d">20</span>).red();
</code></pre>
</div><div class="Raphael-findDotsAtSegment-section"><h3 id="Raphael.findDotsAtSegment" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Raphael.findDotsAtSegment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1200 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1200">&#x27ad;</a></h3>
<div class="extra" id="Raphael.findDotsAtSegment-extra"></div></div><div class="dr-method"><p>Utility method
Find dot coordinates on the given cubic bezier curve at the given t.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">p1x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the first point of the curve</dd>
<dt class="dr-param">p1y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the first point of the curve</dd>
<dt class="dr-param">c1x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the first anchor of the curve</dd>
<dt class="dr-param">c1y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the first anchor of the curve</dd>
<dt class="dr-param">c2x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the second anchor of the curve</dd>
<dt class="dr-param">c2y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the second anchor of the curve</dd>
<dt class="dr-param">p2x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the second point of the curve</dd>
<dt class="dr-param">p2y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the second point of the curve</dd>
<dt class="dr-param">t</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">position on the curve (0..1)</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">point information in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the point</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the point</span>
<li> m: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the left anchor</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the left anchor</span>
</ol></li><li> }</li><li> n: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right anchor</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the right anchor</span>
</ol></li><li> }</li><li> start: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the start of the curve</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the start of the curve</span>
</ol></li><li> }</li><li> end: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the end of the curve</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the end of the curve</span>
</ol></li><li> }</li><li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of the curve derivative at the point</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-fn-section"><h3 id="Raphael.fn" class="dr-property"><i class="dr-trixie">&#160;</i>Raphael.fn<a href="#Raphael.fn" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 371 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L371">&#x27ad;</a></h3>
<div class="extra" id="Raphael.fn-extra"></div></div><div class="dr-property"><em class="dr-type dr-type-object">object</em><p>You can add your own method to the canvas. For example if you want to draw a pie chart,
you can create your own pie chart function and ship it as a Raphaël plugin. To do this
you need to extend the <code>Raphael.fn</code> object. You should modify the <code>fn</code> object before a
Raphaël instance is created, otherwise it will take no effect. Please note that the
ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to
ensure any namespacing ensures proper context.
</p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>Raphael.fn.arrow<span class="s"> = </span><b>function</b> (x1, y1, x2, y2, size) {
    <b>return</b> <b>this</b>.path( ... );
};
<span class="c">// or create namespace</span>
Raphael.fn.mystuff<span class="s"> = </span>{
    arrow: <b>function</b> () {…},
    star: <b>function</b> () {…},
    <span class="c">// etc…</span>
};
<b>var</b> paper<span class="s"> = </span>Raphael(<span class="d">10</span>, <span class="d">10</span>, <span class="d">630</span>, <span class="d">480</span>);
<span class="c">// then use it</span>
paper.arrow(<span class="d">10</span>, <span class="d">10</span>, <span class="d">30</span>, <span class="d">30</span>, <span class="d">5</span>).attr({fill: <i>"#f00"</i>});
paper.mystuff.arrow();
paper.mystuff.star();
</code></pre>
</div><div class="Raphael-format-section"><h3 id="Raphael.format" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.format(token, …)<a href="#Raphael.format" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 5077 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L5077">&#x27ad;</a></h3>
<div class="extra" id="Raphael.format-extra"></div></div><div class="dr-method"><p>Simple format function. Replaces construction of type “<code>{&lt;number>}</code>” to the corresponding argument.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">token</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">string to format</dd>
<dt class="dr-param"></dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">rest of arguments will be treated as parameters for replacement</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">formated string</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><b>var</b> x<span class="s"> = </span><span class="d">10</span>,
    y<span class="s"> = </span><span class="d">20</span>,
    width<span class="s"> = </span><span class="d">40</span>,
    height<span class="s"> = </span><span class="d">50</span>;
<span class="c">// <b>this</b> will draw a rectangular shape equivalent to <i>"M10,20h40v50h-40z"</i></span>
paper.path(Raphael.format(<i>"M{<span class="d">0</span>},{<span class="d">1</span>}h{<span class="d">2</span>}v{<span class="d">3</span>}h{<span class="d">4</span>}z"</i>, x, y, width, height, -width));
</code></pre>
</div><div class="Raphael-fullfill-section"><h3 id="Raphael.fullfill" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.fullfill(token, json)<a href="#Raphael.fullfill" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 5107 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L5107">&#x27ad;</a></h3>
<div class="extra" id="Raphael.fullfill-extra"></div></div><div class="dr-method"><p>A little bit more advanced format function than <a href="#Raphael.format" class="dr-link">Raphael.format</a>. Replaces construction of type “<code>{&lt;name>}</code>” to the corresponding argument.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">token</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">string to format</dd>
<dt class="dr-param">json</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">object which properties will be used as a replacement</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">formated string</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code><span class="c">// <b>this</b> will draw a rectangular shape equivalent to <i>"M10,20h40v50h-40z"</i></span>
paper.path(Raphael.fullfill(<i>"M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z"</i>, {
    x: <span class="d">10</span>,
    y: <span class="d">20</span>,
    dim: {
        width: <span class="d">40</span>,
        height: <span class="d">50</span>,
        <i>"negative width"</i>: -<span class="d">40</span>
    }
}));
</code></pre>
</div><div class="Raphael-getColor-section"><h3 id="Raphael.getColor" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getColor([value])<a href="#Raphael.getColor" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 999 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L999">&#x27ad;</a></h3>
<div class="extra" id="Raphael.getColor-extra"></div></div><div class="dr-method"><p>On each call returns next colour in the spectrum. To reset it back to red call <a href="#Raphael.getColor.reset" class="dr-link">Raphael.getColor.reset</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param optional">value</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">brightness, default is <code>0.75</code></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the colour.</span></p>
</div><div class="Raphael-getColor-reset-section"><h4 id="Raphael.getColor.reset" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getColor.reset()<a href="#Raphael.getColor.reset" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1016 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1016">&#x27ad;</a></h4>
<div class="extra" id="Raphael.getColor.reset-extra"></div></div><div class="dr-method"><p>Resets spectrum position for <a href="#Raphael.getColor" class="dr-link">Raphael.getColor</a> back to red.
</p>
</div><div class="Raphael-getPointAtLength-section"><h3 id="Raphael.getPointAtLength" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getPointAtLength(path, length)<a href="#Raphael.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3775 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3775">&#x27ad;</a></h3>
<div class="extra" id="Raphael.getPointAtLength-extra"></div></div><div class="dr-method"><p>Return coordinates of the point located at the given length on the given path.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">SVG path string</dd>
<dt class="dr-param">length</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">representation of the point:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate</span>
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-getRGB-section"><h3 id="Raphael.getRGB" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getRGB(colour)<a href="#Raphael.getRGB" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 877 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L877">&#x27ad;</a></h3>
<div class="extra" id="Raphael.getRGB-extra"></div></div><div class="dr-method"><p>Parses colour string as RGB object
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">colour</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">colour string in one of formats:</dd>
</dl>
<ul>
    <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
    <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
    <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
    <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
    <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
    <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
    <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
    <li>hsl(•••, •••, •••) — same as hsb</li>
    <li>hsl(•••%, •••%, •••%) — same as hsb</li>
</ul>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">RGB object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">r</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">red,</span>
<li><span class="dr-json-key">g</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">green,</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue</span>
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••,</span>
<li><span class="dr-json-key">error</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">true if string can’t be parsed</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-getSubpath-section"><h3 id="Raphael.getSubpath" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getSubpath(path, from, to)<a href="#Raphael.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3790 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3790">&#x27ad;</a></h3>
<div class="extra" id="Raphael.getSubpath-extra"></div></div><div class="dr-method"><p>Return subpath of a given path from given length to given length.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">SVG path string</dd>
<dt class="dr-param">from</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">position of the start of the segment</dd>
<dt class="dr-param">to</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">position of the end of the segment</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">pathstring for the segment</span></p>
</div><div class="Raphael-getTotalLength-section"><h3 id="Raphael.getTotalLength" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.getTotalLength(path)<a href="#Raphael.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3756 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L3756">&#x27ad;</a></h3>
<div class="extra" id="Raphael.getTotalLength-extra"></div></div><div class="dr-method"><p>Returns length of the given path in pixels.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">SVG path string.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length.</span></p>
</div><div class="Raphael-hsb-section"><h3 id="Raphael.hsb" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.hsb(h, s, b)<a href="#Raphael.hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 959 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L959">&#x27ad;</a></h3>
<div class="extra" id="Raphael.hsb-extra"></div></div><div class="dr-method"><p>Converts HSB values to hex representation of the colour.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">h</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">hue</dd>
<dt class="dr-param">s</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">saturation</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">value or brightness</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the colour.</span></p>
</div><div class="Raphael-hsb2rgb-section"><h3 id="Raphael.hsb2rgb" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.hsb2rgb(h, s, v)<a href="#Raphael.hsb2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 673 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L673">&#x27ad;</a></h3>
<div class="extra" id="Raphael.hsb2rgb-extra"></div></div><div class="dr-method"><p>Converts HSB values to RGB object.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">h</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">hue</dd>
<dt class="dr-param">s</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">saturation</dd>
<dt class="dr-param">v</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">value or brightness</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">RGB object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">r</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">red,</span>
<li><span class="dr-json-key">g</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">green,</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-hsl-section"><h3 id="Raphael.hsl" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.hsl(h, s, l)<a href="#Raphael.hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 973 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L973">&#x27ad;</a></h3>
<div class="extra" id="Raphael.hsl-extra"></div></div><div class="dr-method"><p>Converts HSL values to hex representation of the colour.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">h</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">hue</dd>
<dt class="dr-param">s</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">saturation</dd>
<dt class="dr-param">l</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">luminosity</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the colour.</span></p>
</div><div class="Raphael-hsl2rgb-section"><h3 id="Raphael.hsl2rgb" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.hsl2rgb(h, s, l)<a href="#Raphael.hsl2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 710 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L710">&#x27ad;</a></h3>
<div class="extra" id="Raphael.hsl2rgb-extra"></div></div><div class="dr-method"><p>Converts HSL values to RGB object.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">h</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">hue</dd>
<dt class="dr-param">s</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">saturation</dd>
<dt class="dr-param">l</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">luminosity</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">RGB object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">r</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">red,</span>
<li><span class="dr-json-key">g</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">green,</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-is-section"><h3 id="Raphael.is" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.is(o, type)<a href="#Raphael.is" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 384 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L384">&#x27ad;</a></h3>
<div class="extra" id="Raphael.is-extra"></div></div><div class="dr-method"><p>Handfull replacement for <code>typeof</code> operator.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">o</dt>
<dd class="dr-type"><em class="dr-type-…"></em></dd>
<dd class="dr-description">any object or primitive</dd>
<dt class="dr-param">type</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">name of the type, i.e. “string”, “function”, “number”, etc.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description">is given value is of given type</span></p>
</div><div class="Raphael-isBBoxIntersect-section"><h3 id="Raphael.isBBoxIntersect" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.isBBoxIntersect(bbox1, bbox2)<a href="#Raphael.isBBoxIntersect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1300 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1300">&#x27ad;</a></h3>
<div class="extra" id="Raphael.isBBoxIntersect-extra"></div></div><div class="dr-method"><p>Utility method
Returns <code>true</code> if two bounding boxes intersect
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">bbox1</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">first bounding box</dd>
<dt class="dr-param">bbox2</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">second bounding box</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if they intersect</span></p>
</div><div class="Raphael-isPointInsideBBox-section"><h3 id="Raphael.isPointInsideBBox" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.isPointInsideBBox(bbox, x, y)<a href="#Raphael.isPointInsideBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1285 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1285">&#x27ad;</a></h3>
<div class="extra" id="Raphael.isPointInsideBBox-extra"></div></div><div class="dr-method"><p>Utility method
Returns <code>true</code> if given point is inside bounding boxes.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">bbox</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">bounding box</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">x coordinate of the point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">y coordinate of the point</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point inside</span></p>
</div><div class="Raphael-isPointInsidePath-section"><h3 id="Raphael.isPointInsidePath" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.isPointInsidePath(path, x, y)<a href="#Raphael.isPointInsidePath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1545 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1545">&#x27ad;</a></h3>
<div class="extra" id="Raphael.isPointInsidePath-extra"></div></div><div class="dr-method"><p>Utility method
Returns <code>true</code> if given point is inside a given closed path.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x of the point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y of the point</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description">true, if point is inside the path</span></p>
</div><div class="Raphael-mapPath-section"><h3 id="Raphael.mapPath" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.mapPath(path, matrix)<a href="#Raphael.mapPath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 294 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L294">&#x27ad;</a></h3>
<div class="extra" id="Raphael.mapPath-extra"></div></div><div class="dr-method"><p>Transform the path string with given matrix.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string</dd>
<dt class="dr-param">matrix</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">see <a href="#Matrix" class="dr-link">Matrix</a></dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transformed path string</span></p>
</div><div class="Raphael-matrix-section"><h3 id="Raphael.matrix" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.matrix(a, b, c, d, e, f)<a href="#Raphael.matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2387 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2387">&#x27ad;</a></h3>
<div class="extra" id="Raphael.matrix-extra"></div></div><div class="dr-method"><p>Utility method
Returns matrix based on given parameters.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">a</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">c</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">d</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">e</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
<dt class="dr-param">f</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">&#160;</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div><div class="Raphael-ninja-section"><h3 id="Raphael.ninja" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.ninja()<a href="#Raphael.ninja" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 5144 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L5144">&#x27ad;</a></h3>
<div class="extra" id="Raphael.ninja-extra"></div></div><div class="dr-method"><p>If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable <code>Raphael</code>, but anyway.) You can use <code>ninja</code> method.
Beware, that in this case plugins could stop working, because they are depending on global variable existance.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphael object</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>(<b>function</b> (local_raphael) {
    <b>var</b> paper<span class="s"> = </span>local_raphael(<span class="d">10</span>, <span class="d">10</span>, <span class="d">320</span>, <span class="d">200</span>);
    …
})(Raphael.ninja());
</code></pre>
</div><div class="Raphael-parsePathString-section"><h3 id="Raphael.parsePathString" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.parsePathString(pathString)<a href="#Raphael.parsePathString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1069 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1069">&#x27ad;</a></h3>
<div class="extra" id="Raphael.parsePathString-extra"></div></div><div class="dr-method"><p>Utility method
Parses given path string into an array of arrays of path segments.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">pathString</dt>
<dd class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em></dd>
<dd class="dr-description">path string or array of segments (in the last case it will be returned straight away)</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments.</span></p>
</div><div class="Raphael-parseTransformString-section"><h3 id="Raphael.parseTransformString" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.parseTransformString(TString)<a href="#Raphael.parseTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1120 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1120">&#x27ad;</a></h3>
<div class="extra" id="Raphael.parseTransformString-extra"></div></div><div class="dr-method"><p>Utility method
Parses given path string into an array of transformations.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">TString</dt>
<dd class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em></dd>
<dd class="dr-description">transform string or array of transformations (in the last case it will be returned straight away)</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of transformations.</span></p>
</div><div class="Raphael-path2curve-section"><h3 id="Raphael.path2curve" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.path2curve(pathString)<a href="#Raphael.path2curve" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2370 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2370">&#x27ad;</a></h3>
<div class="extra" id="Raphael.path2curve-extra"></div></div><div class="dr-method"><p>Utility method
Converts path to a new path where all segments are cubic bezier curves.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">pathString</dt>
<dd class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em></dd>
<dd class="dr-description">path string or array of segments</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments.</span></p>
</div><div class="Raphael-pathBBox-section"><h3 id="Raphael.pathBBox" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.pathBBox(path)<a href="#Raphael.pathBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1574 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1574">&#x27ad;</a></h3>
<div class="extra" id="Raphael.pathBBox-extra"></div></div><div class="dr-method"><p>Utility method
Return bounding box of a given path
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">bounding box</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the left top point of the box</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the left top point of the box</span>
<li><span class="dr-json-key">x2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right bottom point of the box</span>
<li><span class="dr-json-key">y2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the right bottom point of the box</span>
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box</span>
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-pathIntersection-section"><h3 id="Raphael.pathIntersection" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.pathIntersection(path1, path2)<a href="#Raphael.pathIntersection" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1473 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L1473">&#x27ad;</a></h3>
<div class="extra" id="Raphael.pathIntersection-extra"></div></div><div class="dr-method"><p>Utility method
Finds intersections of two paths
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">path1</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string</dd>
<dt class="dr-param">path2</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">path string</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">dots of intersection</span></p>
<ol class="dr-json"><li>[<li> {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the point</span>
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the point</span>
<li><span class="dr-json-key">t1:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">t value for segment of path1</span>
<li><span class="dr-json-key">t2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">t value for segment of path2</span>
<li><span class="dr-json-key">segment1:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">order number for segment of path1</span>
<li><span class="dr-json-key">segment2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">order number for segment of path2</span>
<li><span class="dr-json-key">bez1:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path1</span>
<li><span class="dr-json-key">bez2:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path2</span>
</ol></li><li> }</li><li>]</ol>
</div><div class="Raphael-pathToRelative-section"><h3 id="Raphael.pathToRelative" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.pathToRelative(pathString)<a href="#Raphael.pathToRelative" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2357 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L2357">&#x27ad;</a></h3>
<div class="extra" id="Raphael.pathToRelative-extra"></div></div><div class="dr-method"><p>Utility method
Converts path to relative form
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">pathString</dt>
<dd class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em></dd>
<dd class="dr-description">path string or array of segments</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments.</span></p>
</div><div class="Raphael-rad-section"><h3 id="Raphael.rad" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.rad(deg)<a href="#Raphael.rad" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 445 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L445">&#x27ad;</a></h3>
<div class="extra" id="Raphael.rad-extra"></div></div><div class="dr-method"><p>Transform angle to radians
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">deg</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle in degrees</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in radians.</span></p>
</div><div class="Raphael-registerFont-section"><h3 id="Raphael.registerFont" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.registerFont(font)<a href="#Raphael.registerFont" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4874 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4874">&#x27ad;</a></h3>
<div class="extra" id="Raphael.registerFont-extra"></div></div><div class="dr-method"><p>Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.
Returns original parameter, so it could be used with chaining.
</p>
<a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">font</dt>
<dd class="dr-type"><em class="dr-type-object">object</em></dd>
<dd class="dr-description">the font to register</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the font you passed in</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>Cufon.registerFont(Raphael.registerFont({…}));
</code></pre>
</div><div class="Raphael-rgb-section"><h3 id="Raphael.rgb" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.rgb(r, g, b)<a href="#Raphael.rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 987 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L987">&#x27ad;</a></h3>
<div class="extra" id="Raphael.rgb-extra"></div></div><div class="dr-method"><p>Converts RGB values to hex representation of the colour.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">red</dd>
<dt class="dr-param">g</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">green</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">blue</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the colour.</span></p>
</div><div class="Raphael-rgb2hsb-section"><h3 id="Raphael.rgb2hsb" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.rgb2hsb(r, g, b)<a href="#Raphael.rgb2hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 750 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L750">&#x27ad;</a></h3>
<div class="extra" id="Raphael.rgb2hsb-extra"></div></div><div class="dr-method"><p>Converts RGB values to HSB object.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">red</dd>
<dt class="dr-param">g</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">green</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">blue</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">HSB object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">h</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">hue</span>
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">brightness</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-rgb2hsl-section"><h3 id="Raphael.rgb2hsl" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.rgb2hsl(r, g, b)<a href="#Raphael.rgb2hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 784 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L784">&#x27ad;</a></h3>
<div class="extra" id="Raphael.rgb2hsl-extra"></div></div><div class="dr-method"><p>Converts RGB values to HSL object.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">red</dd>
<dt class="dr-param">g</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">green</dd>
<dt class="dr-param">b</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">blue</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">HSL object in format:</span></p>
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">h</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">hue</span>
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation</span>
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">luminosity</span>
</ol></li><li>}</li></ol>
</div><div class="Raphael-setWindow-section"><h3 id="Raphael.setWindow" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.setWindow(newwin)<a href="#Raphael.setWindow" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 515 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L515">&#x27ad;</a></h3>
<div class="extra" id="Raphael.setWindow-extra"></div></div><div class="dr-method"><p>Used when you need to draw in <code>&lt;iframe></code>. Switched window to the iframe one.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">newwin</dt>
<dd class="dr-type"><em class="dr-type-window">window</em></dd>
<dd class="dr-description">new window object</dd>
</dl>
</div><div class="Raphael-snapTo-section"><h3 id="Raphael.snapTo" class="dr-method"><i class="dr-trixie">&#160;</i>Raphael.snapTo(values, value, [tolerance])<a href="#Raphael.snapTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 471 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L471">&#x27ad;</a></h3>
<div class="extra" id="Raphael.snapTo-extra"></div></div><div class="dr-method"><p>Snaps given value to given grid.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">values</dt>
<dd class="dr-type"><em class="dr-type-array">array</em> <em class="dr-type-number">number</em></dd>
<dd class="dr-description">given array of values or step of the grid</dd>
<dt class="dr-param">value</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">value to adjust</dd>
<dt class="dr-param optional">tolerance</dt>
<dd class="dr-optional">optional</dd>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">tolerance for snapping. Default is <code>10</code>.</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">adjusted value.</span></p>