Functions / isPointIn
isPointIn(x, y, [global])
isPointIn(float x, float y)
isPointIn(float x, float y, bool global)

The method allows to define, whether the point with the set coordinates belongs to jCanvaScript object.
isPointIn(float x, float y)
return: bool isPointIn
Canvas coordinates are by default used.
Code
<script type="text/javascript">	
	function onload_1(idCanvas)	
	{	
		jc.start(idCanvas);
		jc.circle(100,120,50,1)
			.id('myCircle_1');		
		jc.start(idCanvas);
	}
	function start_1(idCanvas)
	{
		alert(jc('#myCircle_1').isPointIn(100,120))
	}
	function stop_1(idCanvas)
	{
		alert(jc('#myCircle_1').isPointIn(200,200))
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
isPointIn(float x, float y, bool global)
return: bool isPointIn
You can transfer the additional parameter, allowing to use screen coordinates. Try to click on object on an example below.
Code
<script type="text/javascript">	
	function onload_2(idCanvas)	
	{	
		jc.start(idCanvas,true);
		jc.circle(100,120,50,1)
			.id('myCircle_2');
		document.getElementById(idCanvas)
			.onclick=function(e){
				alert(jc('#myCircle_2').isPointIn(e.pageX,e.pageY,true));
			};		
	}
</script>
<canvas id="canvas_2" width="250px" height="265px">
</canvas>
View