Un ejemplo here.Html5 Método de lienzo isPointInPath determina solo el último objeto
var context=document.getElementById("canvas").getContext("2d");
//Red Box
context.beginPath();
context.fillStyle="Red";
context.rect(10,10,50,50);
context.fill();
//Pink circle
context.beginPath();
context.lineWidth="3";
context.fillStyle="Pink";
context.arc(250,250,50,0,Math.PI*2,false);
context.fill();
context.stroke();
context.font="1.2em Verdana";
context.fillStyle="Black";
context.fillText(context.isPointInPath(35,35),35,35);
context.fillText(context.isPointInPath(250,250),250,250);
Si escribe sin beginPath todos los objetos detectados. ¿Cómo identificar objetos en el lienzo u omitir beginPath?
+1 para un caso de prueba simple, elegante, y debidamente pared hacia abajo explicando su problema. – Phrogz