Functions / transform
transform(m11, m12, m21, m22, dX, dY, reset)
transform( )
transform(float m11, m12, float m21, float m22, float dX, float dY)
transform(float m11, m12, float m21, float m22, float dX, float dY, bool reset)

Function for free transform of jCanvaScript objects.
transform( )
return: array
Return an array - transformation matrix.
Code
<script type="text/javascript">	
	function start_1(idCanvas)
	{
		jc('#myRect_1')
			.transform(0.5,0,0,1,10,20);
	}
	function stop_1(idCanvas)
	{
		alert(jc('#myRect_1').transform());
	}
	function onload_1(idCanvas)	
	{	
		jc.start(idCanvas,true);
		jc.rect(50,50,50,30,'#ff0000',1)
			.id('myRect_1');
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
transform(float m11, m12, float m21, float m22, float dX, float dY)
return: object
This method multiply the current transformation matrix with the matrix from its arguments.
Code
<script type="text/javascript">	
	function start_2(idCanvas)
	{
		jc('#myRect_2')
			.transform(0.5,0,0,1,10,20);
	}
	function stop_2(idCanvas)
	{
		jc('#myRect_2')
			.transform(1,0.5,0,-1,-10,-20);
	}
	function onload_2(idCanvas)	
	{	
		jc.start(idCanvas,true);
		jc.rect(50,50,50,30,'#ff0000',1)
			.id('myRect_2');
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View
transform(float m11, m12, float m21, float m22, float dX, float dY, bool reset)
return: object
Code
<script type="text/javascript">	
	function start_3(idCanvas)
	{
		jc('#myRect_3')
			.transform(1,0,0,1,10,40,true);
	}
	function stop_3(idCanvas)
	{
		jc('#myRect_3')
			.transform(1,0,0,1,10,-40,true);
	}
	function onload_3(idCanvas)	
	{	
		jc.start(idCanvas,true);
		jc.rect(100,120,50,30,'#ff0000',1)
			.id('myRect_3');
	}
</script>
<canvas id="canvas_3" width="250px" height="265px">
</canvas>
View