Objects / rGradient
rGradient(x1, y1, radius1, x2, y2, radius2, colors)
rGradient(float x1, float y1, float radius1, float x2, float y2, float radius2, array colors)
rGradient(object parameters)

Create a jCanvaScript object, which you can use to set radial gradient as a color of other jCanvaScript objects.
rGradient(float x1, float y1, float radius1, float x2, float y2, float radius2, array colors)
Code
<script type="text/javascript">
	function onload_1(idCanvas)
	{
		jc.start(idCanvas);
		var colors=[[0,'rgb(0,0,0)'],
					[0.5,'rgb(255,0,0)'],
					[0.75,'rgb(255,255,0)']];
		var gradient=jc.rGradient(10,30,20,10,30,250,colors);
		jc.rect(1,1,248,263,gradient,1)
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px"></canvas>
View
rGradient(object parameters)
Code
<script type="text/javascript">
	function onload_2(idCanvas)
	{
		jc.start(idCanvas);
		var colors=[[0,'rgb(0,0,0)'],
					[0.5,'rgb(255,0,0)'],
					[0.75,'rgb(255,255,0)']];
		var gradient=jc.rGradient({r2:250,colors:colors});
		jc.rect(1,1,248,263,gradient,1)
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_2" width="250px" height="265px"></canvas>
View