Functions / buffer
buffer([buffering])
buffer( )
buffer(boolean buffering)

buffer( )
return: canvas buffer
Function allow to get link to the canvas element (buffer). If there is no buffer it returns 'false'.
Code
<script type="text/javascript">
	function start_1(idCanvas)
	{
		jc.start(idCanvas);
		var cnv=jc.layer('buf_1')
			.buffer();
		jc.image(cnv,0,0);
	}
	function stop_1(idCanvas)
	{
		jc.clear(idCanvas);
		onload_1(idCanvas);
	}
	function onload_1(idCanvas)
	{
		jc.start(idCanvas,true);
		var gradient = jc.lGradient(100,100,120,150,[[0,"#FF0000"],[1,"#0000FF"]])
			.layer('buf_1');
		jc.rect(100,100,50,20,gradient,1)
			.layer('buf_1');
		jc.circle(100,100,20,'#ff0000',1)
			.layer('buf_1');
		jc.layer('buf_1')
			.buffer(true);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
buffer(boolean buffering)
return: object
You can set buffering to true, if you want to draw object at the new canvas (in buffer). Its allows you to draw it faster. Its better to use buffering with big, complex layers of objects or for complex objects (for example, with gradients).

And, you can set buffering to false in order to stop redrawing it from buffer.

Of course, console.profile() and console.profileEnd() in this example for developers only. You dont need to use them in your applications (you can use firebug or, better, console of Google Chrome to see effect of them).
Code
<script type="text/javascript">
	function start_2(idCanvas)
	{
		console.profile();
		jc.layer('back_2')
			.buffer(true);
		jc.layer('buf_2')
			.buffer(true)
			.translate(-100,-100,3000,
		function(){console.profileEnd();});
	}
	function stop_2(idCanvas)
	{
		console.profile();
		jc.layer('back_2')
			.buffer(false);
		jc.layer('buf_2')
			.buffer(false)
			.translate(100,100,3000,
		function(){console.profileEnd();});
	}
	function onload_2(idCanvas)
	{
		jc.start(idCanvas,true);
		var back= jc.lGradient(0,0,250,265,[[0,"#FFFFFF"],[1,"#CCCCCC"]])
			.layer('back_2');
		jc.rect(0,0,250,265,back,1)
			.layer('back_2');
		var gradient = jc.lGradient(100,100,120,150,[[0,"#FF0000"],[1,"#0000FF"]])
			.layer('buf_2');
		jc.rect(100,100,50,20,gradient,1)
			.layer('buf_2');
		jc.circle(100,100,20,gradient,1)
			.layer('buf_2');
		jc.circle(150,120,20,gradient,1)
			.layer('buf_2');
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View