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

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