Functions / lineStyle
lineStyle({lineWidth})
lineStyle(object {lineWidth})
lineStyle(object {cap})
lineStyle(object {join})
lineStyle(object {miterLimit})
lineStyle(string parameter)

Parameters is an object:{lineWidth:value, cap:value, join:value, miterLimit:value}.
lineStyle(object {lineWidth})
return: object
Allow to set width of object lines. So, you can set width of object lines as positive numbers.
Code
<script type="text/javascript">
var lw=1;
	function start_1(idCanvas)
	{
		lw++;
		jc('#myLine_1')
			.lineStyle({lineWidth:lw});
	}
	function stop_1(idCanvas)
	{
		if(lw>1)lw--;
		jc('#myLine_1')
			.lineStyle({lineWidth:lw});
	}
	
	function onload_1(idCanvas)
	{
		jc.start(idCanvas,true);
		jc.line([[30,100],[220,100]])
			.id('myLine_1');
	}
</script>
<canvas id="canvas_1" width="250px" height="265px"></canvas>
View
lineStyle(object {cap})
return: object
Cap property determines how the end points of every line are drawn. There are three possible values for this property and those are: 'butt', 'round' and 'square'. By default this property is set to 'butt'.
Code
<script type="text/javascript">
var lc=['butt','round','square'];
n=0;
	function start_2(idCanvas)
	{
		if(n<3)n++;
		jc('#myLine_2')
			.lineStyle({cap:lc[n]});
	}
	function stop_2(idCanvas)
	{
		if(n>-1)n--;
		jc('#myLine_2')
			.lineStyle({cap:lc[n]});
	}
	
	function onload_2(idCanvas)
	{
		jc.start(idCanvas,true);
		jc.line([[30,100],[220,100]])
			.lineStyle({lineWidth:20})
			.id('myLine_2');
	}
</script>
<canvas id="canvas_2" width="250px" height="265px"></canvas>
View
lineStyle(object {join})
return: object
Join property determines how two connecting lines in a shape are joined together. There are three possible values for this property: 'round', 'bevel' and 'miter'. By default this property is set to 'miter'.
Code
<script type="text/javascript">
var lj=['miter','round','bevel'];
i=0;
	function start_3(idCanvas)
	{
		if(i>0)i--;
		jc('#myLine_31')
			.lineStyle({join:lj[i]});
		if(i<1)i=3;
	}
	function stop_3(idCanvas)
	{
		if(i>0)i--;
		jc('#myLine_32')
			.lineStyle({join:lj[i]});
		if(i<1)i=3;
	}
	
	function onload_3(idCanvas)
	{
		var lj=['round','miter','bevel'];
		jc.start(idCanvas,true);
		for(var j=0;j<3;j++)
			jc.line([[30,150+j*50],[125,50+j*50],[220,150+j*50]])
				.lineStyle({
				lineWidth:10,
				miterLimit:50,
				join:lj[j]})
			.id('myLine_3'+j);
	}
</script>
<canvas id="canvas_3" width="250px" height="265px"></canvas>
View
lineStyle(object {miterLimit})
return: object
The miterLimit property determines how far the outside connection point can be placed from the inside connection point. If two lines exceed this value, a bevel join will be drawn.
Code
<script type="text/javascript">
var ml=10;
	function start_4(idCanvas)
	{
		ml+=2;
		jc('#myLine_4')
			.lineStyle({miterLimit:ml});
	}
	function stop_4(idCanvas)
	{
		ml-=2;
		jc('#myLine_4')
			.lineStyle({miterLimit:ml});
		if(ml<1)ml=1
	}
	
	function onload_4(idCanvas)
	{
		var lj=['round','miter','bevel'];
		jc.start(idCanvas,true);
		arr=[[0,150]];
		for (var i=0;i<24;i++){
			var dy = i%2==0 ? 50 : -50 ;
			arr[arr.length]=[Math.pow(i,1.5)*2,125+dy];
		} 
		jc.line(arr)
			.lineStyle({
			lineWidth:10,
			miterLimit:ml})
		.id('myLine_4');
	}
</script>
<canvas id="canvas_4" width="250px" height="265px"></canvas>
View
lineStyle(string parameter)
return: value of parameter
Code
<script type="text/javascript">
	function start_5(idCanvas)
	{
		alert('join:'+
			jc('#myLine_5').lineStyle('join'));
	}
	function stop_5(idCanvas)
	{
		alert('cap:'+
			jc('#myLine_5').lineStyle('cap'));
	}
	function onload_5(idCanvas)
	{
		jc.start(idCanvas,true);
		jc.line([[30,100],[220,100]])
			.lineStyle({lineWidth:10,
				cap:'round',
				join: 'bevel',
				miterLimit: 10})
			.id('myLine_5');
	}
</script>
<canvas id="canvas_5" width="250px" height="265px"></canvas>
View