Objects / bCurve
bCurve(points, [color], [fill])
bCurve(array points)
bCurve(array points, string color)
bCurve(array points, bool fill)
bCurve(array points, string color, bool fill)
bCurve(object parameters)

Create a jCanvaScript object,which draws bezier curve on a canvas. Array of points contains arrays [x, y, x of control point 1, y of control point 1, x of control point 2, y of control point 2]. For curve creation it is required at least two arrays.
bCurve(array points)
Code
<script type="text/javascript">
	function onload_1(idCanvas)
	{
		jc.start(idCanvas);
		var arr=[];
		arr[0]=[40,30,30,140,140,30];
		arr[1]=[230,240,240,130,130,40];
		jc.bCurve(arr,'#00ffbb');
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
bCurve(array points, string color)
Code
<script type="text/javascript">
	function onload_2(idCanvas)
	{
		jc.start(idCanvas);
		var arr=[];
		arr[0]=[40,30,30,40,40,30];
		arr[1]=[130,140,40,130,130,40];
		arr[2]=[30,180,30,30,30,180];
		jc.bCurve(arr,'#00ffbb');
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View
bCurve(array points, bool fill)
Code
<script type="text/javascript">
	function onload_3(idCanvas)
	{
		jc.start(idCanvas);
		var arr=[];
		arr[0]=[40,30,30,40,40,30];
		arr[1]=[130,140,40,130,130,40];
		arr[2]=[30,180,180,30,30,180];
		jc.bCurve(arr,true);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_3" width="250px" height="265px">
</canvas>
View
bCurve(array points, string color, bool fill)
Code
<script type="text/javascript">
	function onload_4(idCanvas)
	{
		jc.start(idCanvas);
		var arr=[];
		arr[0]=[40,30,30,40,40,30];
		arr[1]=[30,40,40,30,30,40];
		arr[2]=[30,180,180,30,30,180];
		arr[3]=[40,190,190,40,40,190];
		arr[4]=[180,190,190,180,180,190];
		arr[5]=[190,180,180,190,109,180];
		arr[6]=[190,40,40,190,190,40];
		arr[7]=[180,30,30,180,180,30];
		jc.bCurve(arr,'#ffbbcc',true);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_4" width="250px" height="265px">
</canvas>
View
bCurve(object parameters)
Code
<script type="text/javascript">
	function onload_5(idCanvas)
	{
		jc.start(idCanvas);
		var arr=[];
		arr[0]=[40,30,30,40,40,30];
		arr[1]=[30,40,40,30,30,40];
		arr[2]=[30,180,180,30,30,180];
		arr[3]=[40,190,190,40,40,190];
		arr[4]=[180,190,190,180,180,190];
		arr[5]=[190,180,180,190,109,180];
		arr[6]=[190,40,40,190,190,40];
		arr[7]=[180,30,30,180,180,30];
		jc.bCurve({points:arr,color:'#ffbbcc',fill:true});
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_5" width="250px" height="265px">
</canvas>
View