Objects / text
text(text, x, y, [maxWidth], [color], [fill])
text(string text, float x, float y)
text(string text, float x, float y, int maxWidth)
text(string text, float x, float y, string color)
text(string text, float x, float y, string color, bool fill)
text(string text, float x, float y, int maxWidth, string color, bool fill)
text(object parameters)

Create a jCanvaScript object,which allows to write some text on a canvas.
text(string text, float x, float y)
Code
<script type="text/javascript">
	function onload_1(idCanvas)
	{
		jc.start(idCanvas);
		jc.text("Text example",90,130);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
text(string text, float x, float y, int maxWidth)
Code
<script type="text/javascript">
	function onload_2(idCanvas)
	{
		jc.start(idCanvas);
		jc.text("This text width is free",75,120);
		jc.text("This text fit in the limited width",85,140,80);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View
text(string text, float x, float y, string color)
Code
<script type="text/javascript">
	function onload_3(idCanvas)
	{
		jc.start(idCanvas);
		jc.text("Colored text",95,140,'rgb(255,0,0)');
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_3" width="250px" height="265px"></canvas>
View
text(string text, float x, float y, string color, bool fill)
Code
<script type="text/javascript">
	function onload_4(idCanvas)
	{
		jc.start(idCanvas);
		jc.text("Colored stroked text",80,140,'rgb(255,0,0)', 0);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_4" width="250px" height="265px">
</canvas>
View
text(string text, float x, float y, int maxWidth, string color, bool fill)
Code
<script type="text/javascript">
	function onload_5(idCanvas)
	{
		jc.start(idCanvas);
		jc.text("Colored stroked text with limited width",70,140,120,'rgb(55,55,255)', 0);
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_5" width="250px" height="265px">
</canvas>
View
text(object parameters)
Code
<script type="text/javascript">
	function onload_6(idCanvas)
	{
		jc.start(idCanvas);
		jc.text({string:"Colored filled text",x:80,y:140,color:'rgb(255,0,0)',fill: 1});
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_6" width="250px" height="265px">
</canvas>
View