if(x==null){x=0;} if(y==null){y=0;} x = parseInt(x); y = parseInt(y); var idat = obj.ctx.getImageData(x,y,1,1); if(idat.data[3]==0) {return false;} else {return true;}