P.checkHitReturn = function (x, y, cell) {
if (this.checkHitIgnoreTransparency && cell && cell.engine) {
let [copyX, copyY, copyWidth, copyHeight] = this.copyArray;
let [pasteX, pasteY, pasteWidth, pasteHeight] = this.pasteArray;
let [stampX, stampY] = this.currentStampPosition;
let img = cell.engine.getImageData(copyX, copyY, copyWidth, copyHeight);
let myX = x - stampX,
myY = y - stampY;
let index = (((myY * pasteWidth) + myX) * 4) + 3;
if (img.data[index]) {
return {
x: x,
y: y,
artefact: this
};
}
return false;
}
else {
return {
x: x,
y: y,
artefact: this
};
}
};