-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.html
221 lines (217 loc) · 11.8 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Raphaël—JavaScript Library</title>
<meta name="author" content="Dmitry Baranovskiy">
<meta name="description" content="Vector Graphics JavaScript Library">
<meta name="keywords" content="JavaScript Library, Raphael, SVG, VML">
<meta name="viewport" content="width=450">
<link rel="alternate" type="application/atom+xml" href="//twitter.com/statuses/user_timeline/17180567.atom">
<link rel="stylesheet" href="site.css">
<link rel="apple-touch-icon-precomposed" href="/i114.png">
<link rel="shortcut icon" href="/favicon16.png" type="image/x-icon">
</head>
<body class="raphael" id="raphael.dmitry.baranovskiy.com">
<div id="header">
<h1><span> </span>Raphaël—JavaScript Library</h1>
</div>
<div id="content">
<div id="top"> </div>
<div id="column-1">
<h2 id="what-is-it"><span> </span>What is it?</h2>
<p>
Raphaël is a small JavaScript library that should simplify your work with vector graphics on the
web. If you want to create your own specific chart or image crop and rotate widget, for example,
you can achieve it simply and easily with this library.
</p>
<p class="not-prime">
Raphaël ['ræfeɪəl] uses the <abbr title="Sclable Vector Graphics">SVG</abbr> <abbr title="World
Wide Web Consortium">W3C</abbr> Recommendation and <abbr title="Vector Markup Language">VML</abbr>
as a base for creating graphics. This means every graphical object you create is also
a <abbr title="Document Object Model">DOM</abbr> object, so you can attach JavaScript event
handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing
vector art compatible cross-browser and easy.
</p>
<p class="not-prime">
Raphaël currently supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+
and Internet Explorer 6.0+.
</p>
<h2 id="how-to-use-it"><span> </span>How to use it?</h2>
<p>
Download and include <code>raphael.js</code> into your HTML page, then use it as simple as:
</p>
<pre class="javascript code">
<code><span class="c">// Creates canvas 320 × 200 at 10, 50</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">// Creates circle at x = 50, y = 40, with radius 10</span>
<b>var</b> circle <span class="s">=</span> paper.circle(<span class="d">50</span>, <span class="d">40</span>, <span class="d">10</span>);
<span class="c">// Sets the fill attribute of the circle to red (#f00)</span>
circle.attr(<i>"fill"</i>, <i>"#f00"</i>);
<span class="c">// Sets the stroke attribute of the circle to white</span>
circle.attr(<i>"stroke"</i>, <i>"#fff"</i>);</code>
</pre>
<h2 id="demo"><span> </span>Demos</h2>
<ul id="demos">
<li id="playground">
<a href="playground.html" title="Raphaël Playground">Raphaël Playground</a>
</li>
<li id="reflection">
<a href="reflection.html" title="Reflection">Reflection</a>
</li>
<li id="rotation1">
<a href="image-rotation.html" title="Image rotation">Image rotation</a>
</li>
<li id="rotation2">
<a href="text-rotation.html" title="Text rotation">Text rotation</a>
</li>
<li id="impact">
<a href="github/impact.html" title="GitHub-a-like impact chart">GitHub-a-like impact chart</a>
</li>
<li id="punch">
<a href="github/dots.html" title="GitHub-a-like punch chart">GitHub-a-like punch chart</a>
</li>
<li id="pie">
<a href="pie.html" title="GitHub-a-like languages chart">GitHub-a-like languages chart</a>
</li>
<li id="analytics">
<a href="analytics.html" title="Raphaël Analytics chart">Raphaël Analytics chart</a>
</li>
<li id="polar">
<a href="polar-clock.html" title="Polar Clock">Polar Clock</a>
</li>
<li id="spin">
<a href="spin-spin-spin.html" title="Dynamic Spinner">Dynamic Spinner</a>
</li>
<li id="australia">
<a href="australia.html" title="Australian Map">Australian Map</a>
</li>
<li id="helvetica">
<a href="helvetica.html" title="Dancing Helvetica">Dancing Helvetica</a>
</li>
<li id="chart">
<a href="chart.html" title="Multichart">Multichart</a>
</li>
<li id="animation">
<a href="animation.html" title="Animation">Animation</a>
</li>
<li id="tiger">
<a href="tiger.html" title="SVG “Hello World”">Tiger</a>
</li>
<li id="hand">
<a href="hand.html" title="Hand">Hand</a>
</li>
<li id="ichart">
<a href="ichart.html" title="Interactive Chart">Interactive Chart</a>
</li>
<li id="graffle">
<a href="graffle.html" title="Diagram">Diagram</a>
</li>
<li id="fonts">
<a href="fonts.html" title="Custom Fonts">Custom Fonts</a>
</li>
<li id="easing">
<a href="easing.html" title="Animation Easing">Animation Easing</a>
</li>
<li id="ball">
<a href="ball.html" title="Gradients Example">Gradients Example</a>
</li>
<li id="curver">
<a href="curver.html" title="Mini Illustrator">Curver</a>
</li>
<li id="gear">
<a href="gear.html" title="Animation along the path demo">Animation along the path demo</a>
</li>
<li id="scape">
<a href="/scape/" title="3D Shooter">3D Shooter</a>
</li>
<li id="picker">
<a href="picker.html" title="Colour Picker">Colour Picker</a>
</li>
<li id="growing-pie">
<a href="growing-pie.html" title="Growing Pie">Growing Pie</a>
</li>
<li id="bounce">
<a href="bounce.html" title="Bounce">Bounce</a>
</li>
<li id="angry">
<a href="angry.html" title="Angry Birds Clone">Angry Birds Clone</a>
</li>
</ul>
</div>
<div id="column-2">
<ul id="aside">
<li id="download">
<h2><a href="//github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js" title="Minified Library Code"><span> </span>Download v. 2.0.0 (82 Kb)</a></h2>
<p>
Our recommendation is to <abbr title="GNU ZIP">GZIP</abbr> it. It will help to reduce file size to <strong>20 Kb</strong>.
</p>
<p>
You can download <a href="//github.com/DmitryBaranovskiy/raphael/raw/master/raphael.js" title="Uncompressed Library Code">uncompressed source (201 Kb)</a> as well.
</p>
</li>
<li id="documentation">
<h2><a href="reference.html" title="Documentation"><span> </span>Documentation</a></h2>
</li>
<li id="discuss">
<h2><a href="//groups.google.com/group/raphaeljs" title="Google Group"><span> </span>Discussion Group</a></h2>
</li>
<li id="irc">
<h2><span> </span>IRC Channel</h2>
<p>#raphael.js at irc.freenode.net</p>
</li>
<li id="twitter">
<h2><a href="//twitter.com/RaphaelJS/" title="Twitter"><span> </span>Twitter</a></h2>
</li>
<li id="icons">
<h2><a href="/icons/" title="Free icons"><span> </span>Free Icons</a></h2>
</li>
<li id="donate">
<h2><a href="//www.pledgie.com/campaigns/1776" title="Donate, but only if you like it"><span> </span>Donate</a></h2>
</li>
<li id="opensource">
<h2><a href="/license.html" rel="license" title="MIT License"><span> </span>MIT License</a></h2>
</li>
<li id="sencha">
<h2>Part of <strong><a href="//sencha.com/"><span> </span>Sencha Labs</a></strong></h2>
</li>
<li id="github">
<h2><a href="//github.com/DmitryBaranovskiy/raphael/" title="Source Code at GitHub"><span> </span>Source <em class="amp">&</em> Bugs</a></h2>
</li>
<li id="t-shirts">
<h2><a href="//www.redbubble.com/people/dmitrybaranovsk/shop/raphaeljs+t-shirts" title="t-shirts for sale"><span> </span>T-shirts <em class="amp">&</em> Stickers</a></h2>
</li>
<li id="quotes">
<h2><span> </span>Quotes on Twitter</h2>
<ol>
<li> </li>
</ol>
</li>
</ul>
</div>
<div id="footer">
<h3 id="copyright"><a href="/license.html" title="MIT License" rel="license">Some Rights Reserved</a> by <a href="//dmitry.baranovskiy.com/">Dmitry Baranovskiy</a></h3>
<h3 id="font">Logo by <a href="//wasabicube.com/">Wasabicube</a></h3>
</div>
</div>
<script>
var _gaq = _gaq || [];
_gaq.push(["_setAccount", "UA-616618-3"]);
_gaq.push(["_trackPageview"]);
(function() {
var ga = document.createElement("script");
ga.async = true;
ga.src = "http://www.google-analytics.com/ga.js";
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
window.onload = function() {
ga = document.createElement("script");
ga.src = "raphael.js";
s.parentNode.insertBefore(ga, s);
ga = document.createElement("script");
ga.src = "site.js";
s.parentNode.insertBefore(ga, s);
};
})();
</script>
</body>
</html>