
circle = {
	"draw" : function(circle,context) {
		p0 = circle.magnets[0];
		p1 = circle.magnets[1];
		p2 = circle.magnets[2];
		p3 = circle.magnets[3];
		p4 = circle.magnets[4];
		var radius = (p4.x-p1.x)/2;
		context.beginPath();
		context.arc(p1.x+radius, p1.y+radius, radius, 0, 2*Math.PI, false);
		context.closePath();
		context.fillStyle=circle.color;
		context.fill();
	},
	"containsPoint" : oval.containsPoint,
	"drawSelected" : oval.drawSelected,
	"moveMagnet" : oval.moveMagnet,
	"showEditorPanel" : oval.showEditorPanel,
	"toSource" : function(circle) {
		var s = "  {\n    type:\"circle\",\n    color:\"";
		s += circle.color;
		s += "\",\n    magnets:"+magnetListToSource(circle.magnets)+"\n  }";
		return s;
	}
}

