Raphaël (JavaScript library)
| Raphaël | |
|---|---|
| Developer | Dmitry Baranovskiy |
| Initial release | August 8, 2008[1] |
| Stable release | 2.3.0
/ August 14, 2019[2] |
| Repository |
|
| Written in | JavaScript |
| Engine | |
| License | MIT License |
| Website | dmitrybaranovskiy |
Raphaël, named for Italian painter Raffaello Sanzio da Urbino,[3] is a cross-browser JavaScript library that draws Vector graphics for web sites. It will use SVG for most browsers, but will use VML for older versions of Internet Explorer. Raphaël currently[as of?] supports Chrome 5.0+ Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
Use
[edit | edit source]Raphaël is used by first creating an instance of the Raphaël object, which manages the creation of the canvas. The following examples create a canvas that is 320 pixels wide and 200 pixels high:[citation needed]
// top left of canvas at the viewport's 10,50 coordinate
var r = Raphael(10, 50, 320, 200);
// top left of canvas at the top left corner of the #example element (in elements where dir="ltr")
var r = Raphael(document.getElementById("example"), 320, 200);
// same as above
var r = Raphael("example", 320, 200);
Once the Raphaël object has been instantiated, its various drawing, resizing and animation methods may be called to build up a vector graphic. This library includes support of Cùfon fonts, a format that turns a given font into a set of vector paths. It is extensible through plugins.[citation needed]
Usage
[edit | edit source]The widget is used on the Washington Post and the Times Online websites.[citation needed]
Raphaël is also used by iCloud.com, and by Mass Relevance in the White House.[4]
See also
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
References
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Raphaël in White House: “we (@massrelevance) used @raphaeljs 2.0 for the map viz used during the #AskObama event today http://t.co/EcqROIi”
Further reading
[edit | edit source]- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
External links
[edit | edit source]- Raphaël homepage
- Raphaël syntax
- Raphaël: a JavaScript API for SVG
- An introduction to Raphaël
- Raphael.js: Archived 2011-09-29 at the Wayback Machine javascript vector graphics library for the web