//http://code.tutsplus.com/tutorials/an-introduction-to-the-raphael-js-library--net-7186
//==================================
//Creating our Drawing Canvas
//==================================
/* var paper = new Raphael(x,y,width,height)
the absolute position of the canvas relative to the viewport
var paper = new Raphael(element, width, height)
an element 'container' that the canvas is drawn inside */
windows.onload = function () {
var paper = new Raphael(document.getElementById('canvas_container'), 500, 500;
//Built-in Shapes
var circle = paper.circle(100, 100, 80);
//draw a circle with a radious of 80, x center at 100 and y center at 100
//draw multiple circles with out referencing them
for (var i = 0; i < 5; i += 1) {
var multiplier = i * 5;
paper.circle(250 + (2 * multiplier), 100 + multiplier, 50 - multiplier);
}
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.