1.0
[raphael] / reference.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">
3 <html lang="en">
4     <head>
5         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6         <title>Raphaël Reference</title>
7         <meta name="author" content="Dmitry Baranovskiy">
8         <meta name="description" content="Vector Graphics JavaScript™ Library">
9         <link rel="stylesheet" href="raphael.css" type="text/css" charset="utf-8" media="screen,projection">
10         <link rel="stylesheet" type="text/css" media="print" href="/dmitry-print.css">
11         <link rel="shortcut icon" href="/favicon16.png" type="image/x-icon">
12         <link rel="apple-touch-icon" href="/favicon.png">
13         <script src="../jquery.js" type="text/javascript" charset="utf-8"></script>
14         <script src="../dmitry.js" type="text/javascript" charset="utf-8"></script>
15     </head>
16     <body class="raphael" id="raphael.dmitry.baranovskiy.com">
17         <div id="header">
18             <a href="http://twitter.com/statuses/user_timeline/17180567.atom" id="rss" name="rss">rss</a>
19             <h1>
20                 Raphaël—JavaScript Library
21             </h1>
22         </div>
23         <div id="content">
24             <div>
25                 <div>
26                     <div id="column-1">
27                         <h2>Main Function</h2>
28                         <h3 id="Raphael">
29                             Raphael
30                         </h3>
31                         <p>
32                             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.
33                         </p>
34                         <h4>Parameters</h4>
35                         <ol>
36                             <li>container <em>HTMLElement</em> or <em>string</em></li>
37                             <li>width <em>number</em></li>
38                             <li>height <em>number</em></li>
39                         </ol>
40                         <p>or</p>
41                         <ol>
42                             <li>x <em>number</em></li>
43                             <li>y <em>number</em></li>
44                             <li>width <em>number</em></li>
45                             <li>height <em>number</em></li>
46                         </ol>
47                         <h4>Usage</h4>
48                         <pre class="javascript code"><code>// Each of the following examples create a canvas that is 320px wide by 200px high
49 // Canvas is created at the viewport's 10,50 coordinate
50 var paper = Raphael(10, 50, 320, 200);
51 // Canvas is created at the top left corner of the #notepad element (or its top right corner in dir="rtl" elements)
52 var paper = Raphael(document.getElementById("notepad"), 320, 200);
53 // Same as above
54 var paper = Raphael("notepad", 320, 200);</code></pre>
55                         <h2 id="Element">
56                             Element’s generic methods
57                         </h2>
58                         <p>
59                             Each object created on the canvas shares these same generic methods:
60                         </p>
61                         <h3 id="node">
62                             node
63                         </h3>
64                         <p>
65                             Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
66                         </p>
67                         <h4>Usage</h4>
68                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10); // draw a circle at coordinate 10,10 with radius of 10
69 c.node.onclick = function () { c.attr("fill", "red"); };</code></pre>
70                         <h3 id="remove">
71                             remove
72                         </h3>
73                         <p>
74                             Removes element from the DOM. You can’t use it after this method call.
75                         </p>
76                         <h4>Usage</h4>
77                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
78 c.remove();</code></pre>
79                         <h3 id="hide">
80                             hide
81                         </h3>
82                         <p>
83                             Makes element invisible.
84                         </p>
85                         <h4>Usage</h4>
86                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
87 c.hide();</code></pre>
88                         <h3 id="show">
89                             show
90                         </h3>
91                         <p>
92                             Makes element visible.
93                         </p>
94                         <h4>Usage</h4>
95                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
96 c.show();</code></pre>
97                         <h3 id="rotate">
98                             rotate
99                         </h3>
100                         <p>
101                             Rotates the element by the given degree from its center point.
102                         </p>
103                         <h4>Parameters</h4>
104                         <ol>
105                             <li>degree <em>number</em> Degree of rotation (0 – 360°)</li>
106                             <li>isAbsolute <em>boolean</em> [optional] Specifies is degree is relative to previous position (<code>false</code>) or is it absolute angle (<code>true</code>)</li>
107                         </ol>
108                         <p>or</p>
109                         <ol>
110                             <li>degree <em>number</em> Degree of rotation (0 – 360°)</li>
111                             <li>cx <em>number</em> [optional] X coordinate of the origin of rotation</li>
112                             <li>cY <em>number</em> [optional] Y coordinate of the origin of rotation</li>
113                         </ol>
114                         <h4>Usage</h4>
115                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
116 c.rotate(45);        // rotation is relative
117 c.rotate(45, true);  // rotation is absolute</code></pre>
118                         <h3 id="translate">
119                             translate
120                         </h3>
121                         <p>
122                             Moves the element around the canvas by the given distances.
123                         </p>
124                         <h4>Parameters</h4>
125                         <ol>
126                             <li>dx <em>number</em> Pixels of translation by X axis</li>
127                             <li>dy <em>number</em> Pixels of translation by Y axis</li>
128                         </ol>
129                         <h4>Usage</h4>
130                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
131 c.translate(10, 10); // moves the circle down the canvas, in a diagonal line</code></pre>
132                         <h3 id="scale">
133                             scale
134                         </h3>
135                         <p>
136                             Resizes the element by the given multiplier.
137                         </p>
138                         <h4>Parameters</h4>
139                         <ol>
140                             <li>Xtimes <em>number</em> Amount to scale horizontally</li>
141                             <li>Ytimes <em>number</em> Amount to scale vertically</li>
142                         </ol>
143                         <h4>Usage</h4>
144                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
145 c.scale(1.5, 1.5); // makes the circle 1.5 times larger
146 c.scale(.5, .75);  // makes the circle half as wide, and 75% as high</code></pre>
147                         <h3 id="attr">
148                             attr
149                         </h3>
150                         <p>
151                             Sets the attributes of elements directly.
152                         </p>
153                         <h4>Parameters</h4>
154                         <ol>
155                             <li>attributeName <em>string</em></li>
156                             <li>value <em>string</em></li>
157                         </ol>
158                         <p>or</p>
159                         <ol>
160                             <li>params <em>object</em></li>
161                         </ol>
162                         <p>or</p>
163                         <ol>
164                             <li>attributeName <em>string</em> in this case method returns current value for given attribute name</li>
165                         </ol>
166                         <p>or</p>
167                         <ol>
168                             <li>attributeNames <em>array</em> in this case method returns array of current values for given attribute names</li>
169                         </ol>
170                         <h4>Possible parameters</h4>
171                         <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>
172                         <ul>
173                             <li>cx <em>number</em></li>
174                             <li>cy <em>number</em></li>
175                             <li>fill <em>colour</em></li>
176                             <li>fill-opacity <em>number</em></li>
177                             <li>font <em>string</em></li>
178                             <li>font-family <em>string</em></li>
179                             <li>font-size <em>number</em></li>
180                             <li>font-weight <em>string</em></li>
181                             <li>gradient <em>object|string</em> "‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›"</li>
182                             <li>height <em>number</em></li>
183                             <li>opacity <em>number</em></li>
184                             <li>path <em>pathString</em></li>
185                             <li>r <em>number</em></li>
186                             <li>rotation <em>number</em></li>
187                             <li>rx <em>number</em></li>
188                             <li>ry <em>number</em></li>
189                             <li>scale <em>CSV</em></li>
190                             <li>src <em>string</em> (URL)</li>
191                             <li>stroke <em>colour</em></li>
192                             <li>stroke-dasharray <em>string</em> [“-”, “.”, “-.”, “-..”, “. ”, “- ”, “--”, “- .”, “--.”, “--..”]</li>
193                             <li>stroke-linecap <em>string</em> [“butt”, “square”, “round”, “miter”]</li>
194                             <li>stroke-linejoin <em>string</em> [“butt”, “square”, “round”, “miter”]</li>
195                             <li>stroke-miterlimit <em>number</em></li>
196                             <li>stroke-opacity <em>number</em></li>
197                             <li>stroke-width <em>number</em></li>
198                             <li>translation <em>CSV</em></li>
199                             <li>width <em>number</em></li>
200                             <li>x <em>number</em></li>
201                             <li>y <em>number</em></li>
202                         </ul>
203                         <h4>Usage</h4>
204                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);
205 c.attr("fill", "black");                              // using strings
206 c.attr({fill: "#000", stroke: "#f00", opacity: 0.5}); // using params object</code></pre>
207                         <h3 id="animate">
208                             animate
209                         </h3>
210                         <p>
211                             Linearly changes an attribute from its current value to its specified value in the given amount of milliseconds.
212                         </p>
213                         <h4>Parameters</h4>
214                         <ol>
215                             <li>newAttrs <em>object</em> A parameters object of the animation results. (Not all attributes can be animated.)</li>
216                             <li>ms <em>number</em> The duration of the animation, given in milliseconds.</li>
217                             <li>callback <em>function</em> [optional]</li>
218                         </ol>
219                         <h4>Attributes that can be animated</h4>
220                         <p>The <code>newAttrs</code> parameter accepts an object whose properties are the attributes to animate. However, not all attributes listed in the <code>attr</code> method reference can be animated. The following is a list of those properties that can be animated:</p>
221                         <ul>
222                             <li>cx <em>number</em></li>
223                             <li>cy <em>number</em></li>
224                             <li>fill <em>colour</em></li>
225                             <li>fill-opacity <em>number</em></li>
226                             <li>font-size <em>number</em></li>
227                             <li>height <em>number</em></li>
228                             <li>opacity <em>number</em></li>
229                             <li>path <em>pathString</em></li>
230                             <li>r <em>number</em></li>
231                             <li>rotation <em>number</em></li>
232                             <li>rx <em>number</em></li>
233                             <li>ry <em>number</em></li>
234                             <li>scale <em>CSV</em></li>
235                             <li>stroke <em>colour</em></li>
236                             <li>stroke-opacity <em>number</em></li>
237                             <li>stroke-width <em>number</em></li>
238                             <li>translation <em>CSV</em></li>
239                             <li>width <em>number</em></li>
240                             <li>x <em>number</em></li>
241                             <li>y <em>number</em></li>
242                         </ul>
243                         <h4>Usage</h4>
244                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code>
245 <code>c.animate({cx: 20, r: 20}, 2000);</code></pre>
246                         <h3 id="getBBox">
247                             getBBox
248                         </h3>
249                         <p>
250                             Returns the dimensions of an element.
251                         </p>
252                         <h4>Usage</h4>
253                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code>
254 <code>var width = c.getBBox().width;</code></pre>
255                         <h3 id="toFront">
256                             toFront
257                         </h3>
258                         <p>
259                             Moves the element so it is the closest to the viewer’s eyes, on top of other elements.
260                         </p>
261                         <h4>Usage</h4>
262                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code>
263 <code>c.toFront();</code></pre>
264                         <h3 id="toBack">
265                             toBack
266                         </h3>
267                         <p>
268                             Moves the element so it is the furthest from the viewer’s eyes, behind other elements.
269                         </p>
270                         <h4>Usage</h4>
271                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code>
272 <code>c.toBack();</code></pre>
273                         <h3 id="insertBefore">
274                             insertBefore
275                         </h3>
276                         <p>
277                             Inserts current object before the given one.
278                         </p>
279                         <h4>Usage</h4>
280                         <pre class="javascript code"><code>var r = paper.rect(10, 10, 10, 10);</code>
281 <code>var c = paper.circle(10, 10, 10);</code>
282 <code>c.insertBefore(r);</code></pre>
283                         <h3 id="insertAfter">
284                             insertAfter
285                         </h3>
286                         <p>
287                             Inserts current object after the given one
288                         </p>
289                         <h4>Usage</h4>
290                         <pre class="javascript code"><code>var r = paper.rect(10, 10, 10, 10);</code>
291 <code>var c = paper.circle(10, 10, 10);</code>
292 <code>r.insertAfter(c);</code></pre>
293                         <h2>Graphic Primitives</h2>
294                         <h3 id="circle">
295                             circle
296                         </h3>
297                         <p>
298                             Draws a circle.
299                         </p>
300                         <h4>Parameters</h4>
301                         <ol>
302                             <li>x <em>number</em> X coordinate of the centre</li>
303                             <li>y <em>number</em> Y coordinate of the centre</li>
304                             <li>r <em>number</em> radius</li>
305                         </ol>
306                         <h4>Usage</h4>
307                         <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code></pre>
308                         <h3 id="rect">
309                             rect
310                         </h3>
311                         <p>
312                             Draws a rectangle.
313                         </p>
314                         <h4>Parameters</h4>
315                         <ol>
316                             <li>x <em>number</em> X coordinate of top left corner</li>
317                             <li>y <em>number</em> Y coordinate of top left corner</li>
318                             <li>width <em>number</em></li>
319                             <li>height <em>number</em></li>
320                             <li>r <em>number</em> [optional] radius for rounded corners, default is 0</li>
321                         </ol>
322                         <h4>Usage</h4>
323                         <pre class="javascript code"><code>// regular rectangle</code>
324 <code>var c = paper.rect(10, 10, 10, 10);</code>
325 <code>// rectangle with rounded corners</code>
326 <code>var c = paper.rect(10, 10, 100, 50, 10);</code></pre>
327                         <h3 id="ellipse">
328                             ellipse
329                         </h3>
330                         <p>
331                             Draws an ellipse.
332                         </p>
333                         <h4>Parameters</h4>
334                         <ol>
335                             <li>x <em>number</em> X coordinate of the centre</li>
336                             <li>y <em>number</em> X coordinate of the centre</li>
337                             <li>rx <em>number</em> Horisontal radius</li>
338                             <li>ry <em>number</em> Vertical radius</li>
339                         </ol>
340                         <h4>Usage</h4>
341                         <pre class="javascript code"><code>var c = paper.ellipse(100, 100, 30, 40);</code></pre>
342                         <h3 id="image">
343                             image
344                         </h3>
345                         <p>
346                             Embeds an image into the SVG/VML canvas.
347                         </p>
348                         <h4>Parameters</h4>
349                         <ol>
350                             <li>src <em>string</em> URI of the source image</li>
351                             <li>x <em>number</em> X coordinate position</li>
352                             <li>y <em>number</em> Y coordinate position</li>
353                             <li>width <em>number</em> Width of the image</li>
354                             <li>height <em>number</em> Height of the image</li>
355                         </ol>
356                         <h4>Usage</h4>
357                         <pre class="javascript code"><code>var c = paper.image("apple.png", 10, 10, 100, 100);</code></pre>
358                         <h3 id="set">
359                             set
360                         </h3>
361                         <p>
362                             Creates array-like object to keep and operate couple of elements at once. Warning: it doesn’t create any elements for itself in the page.
363                         </p>
364                         <h4>Usage</h4>
365                         <pre class="javascript code"><code>var st = paper.set();</code>
366 <code>st.push(paper.circle(10, 10, 5));</code>
367 <code>st.push(paper.circle(30, 10, 5));</code>
368 <code>st.attr({fill: "red"});</code></pre>
369                         <h3 id="text">
370                             text
371                         </h3>
372                         <p>
373                             Draws a text string. If you need line breaks, put “\n” in the string.
374                         </p>
375                         <h4>Parameters</h4>
376                         <ol>
377                             <li>x <em>number</em> X coordinate position.</li>
378                             <li>y <em>number</em> Y coordinate position.</li>
379                             <li>text <em>string</em> The text string to draw.</li>
380                         </ol>
381                         <h4>Usage</h4>
382                         <pre class="javascript code"><code>var t = paper.text(10, 10, "Look mom, I'm scalable!");</code></pre>
383                         <h3 id="path">
384                             path
385                         </h3>
386                         <p>
387                             Initialises path drawing. Typically, this function returns an empty <code>path</code> object and to draw paths you use its built-in methods like <code>lineTo</code> and <code>curveTo</code>. However, you can also specify a path literally by supplying the path data as a second argument.
388                         </p>
389                         <h4>Parameters</h4>
390                         <ol>
391                             <li>params <em>object</em> Attributes for the resulting path as described in the <code><a href="#attr">attr</a></code> reference.</li>
392                             <li>pathString <em>string</em> [optional] Path data in <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>.</li>
393                         </ol>
394                         <h4>Usage</h4>
395                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).lineTo(50, 50); // draw a diagonal line
396 var c = paper.path({stroke: "#036"}, "M 10 10 L 50 50");            // same</code></pre>
397                         <h2>Path Methods</h2>
398                         <h3 id="absolutely">
399                             absolutely
400                         </h3>
401                         <p>
402                             Sets a trigger to count all following units as absolute ones, unless said otherwise. (This is on by default.)
403                         </p>
404                         <h4>Usage</h4>
405                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).absolutely()
406     .moveTo(10, 10).lineTo(50, 50);</code></pre>
407                         <h3 id="relatively">
408                             relatively
409                         </h3>
410                         <p>
411                             Sets a trigger to count all following units as relative ones, unless said otherwise.
412                         </p>
413                         <h4>Usage</h4>
414                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).relatively()
415     .moveTo(10, 10).lineTo(50, 50);</code></pre>
416                         <h3 id="moveTo">
417                             moveTo
418                         </h3>
419                         <p>
420                             Moves the drawing point to the given coordinates.
421                         </p>
422                         <h4>Parameters</h4>
423                         <ol>
424                             <li>x <em>number</em> X coordinate</li>
425                             <li>y <em>number</em> Y coordinate</li>
426                         </ol>
427                         <h4>Usage</h4>
428                         <pre class="javascript code"><code>// Begins drawing the path at coordinate 10,10
429 var c = paper.path({stroke: "#036"}).moveTo(10, 10).lineTo(50, 50);</code></pre>
430                         <h3 id="lineTo">
431                             lineTo
432                         </h3>
433                         <p>
434                             Draws a straight line to the given coordinates.
435                         </p>
436                         <h4>Parameters</h4>
437                         <ol>
438                             <li>x <em>number</em> X coordinate</li>
439                             <li>y <em>number</em> Y coordinate</li>
440                         </ol>
441                         <h4>Usage</h4>
442                         <pre class="javascript code"><code>// Draws a line starting from 10,10 to 50,50
443 var c = paper.path({stroke: "#036"}).moveTo(10, 10).lineTo(50, 50);</code></pre>
444                         <h3 id="cplineTo">
445                             cplineTo
446                         </h3>
447                         <p>
448                             Draws a curved line to the given coordinates. The line will have horizontal anchors on start and on finish.
449                         </p>
450                         <h4>Parameters</h4>
451                         <ol>
452                             <li>x <em>number</em></li>
453                             <li>y <em>number</em></li>
454                             <li>width <em>number</em></li>
455                         </ol>
456                         <h4>Usage</h4>
457                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).cplineTo(50, 50);</code></pre>
458                         <h3 id="curveTo">
459                             curveTo
460                         </h3>
461                         <p>
462                             Draws a bicubic curve to the given coordinates.
463                         </p>
464                         <h4>Parameters</h4>
465                         <ol>
466                             <li>x1 <em>number</em></li>
467                             <li>y1 <em>number</em></li>
468                             <li>x2 <em>number</em></li>
469                             <li>y2 <em>number</em></li>
470                             <li>x3 <em>number</em></li>
471                             <li>y3 <em>number</em></li>
472                         </ol>
473                         <h4>Usage</h4>
474                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).curveTo(10, 15, 45, 45, 50, 50);</code></pre>
475                         <h3 id="qcurveTo">
476                             qcurveTo
477                         </h3>
478                         <p>
479                             Draws a quadratic curve to the given coordinates.
480                         </p>
481                         <h4>Parameters</h4>
482                         <ol>
483                             <li>x1 <em>number</em></li>
484                             <li>y1 <em>number</em></li>
485                             <li>x2 <em>number</em></li>
486                             <li>y2 <em>number</em></li>
487                         </ol>
488                         <h4>Usage</h4>
489                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).curveTo(10, 15, 45, 45, 50, 50);</code></pre>
490                         <h3 id="addRoundedCorner">
491                             addRoundedCorner
492                         </h3>
493                         <p>
494                             Draws a quarter of a circle from the current drawing point.
495                         </p>
496                         <h4>Parameters</h4>
497                         <ol>
498                             <li>r <em>number</em></li>
499                             <li>dir <em>string</em> Two-letter directional instruction, as described below.</li>
500                         </ol>
501                         <h4>Possible <code>dir</code> values</h4>
502                         <dl>
503                             <dt>lu</dt>
504                             <dd>left up</dd>
505                             <dt>ld</dt>
506                             <dd>left down</dd>
507                             <dt>ru</dt>
508                             <dd>right up</dd>
509                             <dt>rd</dt>
510                             <dd>right down</dd>
511                             <dt>ur</dt>
512                             <dd>up right</dd>
513                             <dt>ul</dt>
514                             <dd>up left</dd>
515                             <dt>dr</dt>
516                             <dd>down right</dd>
517                             <dt>dl</dt>
518                             <dd>down left</dd>
519                         </dl>
520                         <h4>Usage</h4>
521                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).addRoundedCorner(10, "rd");</code></pre>
522                         <h3 id="andClose">
523                             andClose
524                         </h3>
525                         <p>
526                             Closes the path being drawn.
527                         </p>
528                         <h4>Usage</h4>
529                         <pre class="javascript code"><code>var c = paper.path({stroke: "#036"}).moveTo(10, 10).andClose();</code></pre>
530                         <h3 id="setSize">
531                             setSize
532                         </h3>
533                         <p>
534                             If you need to change dimensions of the canvas call this method
535                         </p>
536                         <h4>Parameters</h4>
537                         <ol>
538                             <li>width <em>number</em> new width of the canvas</li>
539                             <li>height <em>number</em> new height of the canvas</li>
540                         </ol>
541                         <h3 id="setWindow">
542                             setWindow
543                         </h3>
544                         <p>
545                             Should be called before main Raphael method. Sets which window should be used for drawing. Default is the current one. You need to use it if you want to draw inside <code>iframe</code>
546                         </p>
547                         <h4>Parameters</h4>
548                         <ol>
549                             <li>window <em>object</em></li>
550                         </ol>
551                         <h3 id="getColor">
552                             getColor
553                         </h3>
554                         <p>
555                             Returns a colour object for the next colour in spectrum
556                         </p>
557                         <h4>Parameters</h4>
558                         <ol>
559                             <li>value <em>number</em> brightness [optional]</li>
560                         </ol>
561                         <h4>Usage</h4>
562                         <pre class="javascript code"><code>var c = paper.path({stroke: Raphael.getColor()}, "M10,10L100,100")</code></pre>
563                         <h3 id="getColor-reset">
564                             getColor.reset
565                         </h3>
566                         <p>
567                             Resets getColor function, so it will start from the beginning
568                         </p>
569                     </div>
570                     <div id="column-2">
571                         <h2>
572                             <a href="index.html">Home</a>
573                         </h2>
574                         <h2>
575                             Contents
576                         </h2>
577                         <ul id="contents">
578                             <li>
579                                 <a href="#Raphael"><code>Raphael</code></a>
580                             </li>
581                             <li>
582                                 <a href="#node"><code>node</code></a>
583                             </li>
584                             <li>
585                                 <a href="#remove"><code>remove</code></a>
586                             </li>
587                             <li>
588                                 <a href="#hide"><code>hide</code></a>
589                             </li>
590                             <li>
591                                 <a href="#show"><code>show</code></a>
592                             </li>
593                             <li>
594                                 <a href="#rotate"><code>rotate</code></a>
595                             </li>
596                             <li>
597                                 <a href="#translate"><code>translate</code></a>
598                             </li>
599                             <li>
600                                 <a href="#scale"><code>scale</code></a>
601                             </li>
602                             <li>
603                                 <a href="#attr"><code>attr</code></a>
604                             </li>
605                             <li>
606                                 <a href="#animate"><code>animate</code></a>
607                             </li>
608                             <li>
609                                 <a href="#getBBox"><code>getBBox</code></a>
610                             </li>
611                             <li>
612                                 <a href="#toFront"><code>toFront</code></a>
613                             </li>
614                             <li>
615                                 <a href="#toBack"><code>toBack</code></a>
616                             </li>
617                             <li>
618                                 <a href="#circle"><code>circle</code></a>
619                             </li>
620                             <li>
621                                 <a href="#rect"><code>rect</code></a>
622                             </li>
623                             <li>
624                                 <a href="#ellipse"><code>ellipse</code></a>
625                             </li>
626                             <li>
627                                 <a href="#image"><code>image</code></a>
628                             </li>
629                             <li>
630                                 <a href="#set"><code>set</code></a>
631                             </li>
632                             <li>
633                                 <a href="#text"><code>text</code></a>
634                             </li>
635                             <li>
636                                 <a href="#path"><code>path</code></a>
637                                 <ul>
638                                     <li>
639                                         <a href="#absolutely"><code>absolutely</code></a>
640                                     </li>
641                                     <li>
642                                         <a href="#relatively"><code>relatively</code></a>
643                                     </li>
644                                     <li>
645                                         <a href="#moveTo"><code>moveTo</code></a>
646                                     </li>
647                                     <li>
648                                         <a href="#lineTo"><code>lineTo</code></a>
649                                     </li>
650                                     <li>
651                                         <a href="#cplineTo"><code>cplineTo</code></a>
652                                     </li>
653                                     <li>
654                                         <a href="#curveTo"><code>curveTo</code></a>
655                                     </li>
656                                     <li>
657                                         <a href="#qcurveTo"><code>qcurveTo</code></a>
658                                     </li>
659                                     <li>
660                                         <a href="#addRoundedCorner"><code>addRoundedCorner</code></a>
661                                     </li>
662                                     <li>
663                                         <a href="#andClose"><code>andClose</code></a>
664                                     </li>
665                                 </ul>
666                             </li>
667                             <li>
668                                 <a href="#setSize"><code>setSize</code></a>
669                             </li>
670                             <li>
671                                 <a href="#setWindow"><code>setWindow</code></a>
672                             </li>
673                             <li>
674                                 <a href="#getColor"><code>getColor</code></a>
675                             </li>
676                             <li>
677                                 <a href="#getColor-reset"><code>getColor.reset</code></a>
678                             </li>
679                         </ul>
680                     </div>
681                     <div  id="footer">
682                         <h3 id="copyright">
683                             <a href="http://creativecommons.org/licenses/by-sa/3.0/" title="Creative Commons Attribution-ShareAlike 3.0 Unported" rel="license">Some Rights Reserved</a> by <a href="http://dmitry.baranovskiy.com/">Dmitry Baranovskiy</a>
684                         </h3>
685                         <h3 id="font">
686                             Font by <a href="http://www.exljbris.nl">Jos Buivenga</a> · Logo by <a href="http://wasabicube.com/">Wasabicube</a> ·
687                             Work at this project started as 20% time at <a href="http://www.atlassian.com/" title="Atlassian — Software to Track, Test &#38; Collaborate, from Enterprises to Open Source Projects.">Atlassian</a>
688                         </h3>
689                     </div>
690                 </div>
691             </div>
692         </div>
693         <script type="text/javascript">
694         var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
695         document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
696         </script>
697         <script type="text/javascript">
698         var pageTracker = _gat._getTracker("UA-616618-3");
699         pageTracker._trackPageview();
700         </script>
701     </body>
702 </html>