This commit is contained in:
Kyle
2018-11-07 15:59:06 -08:00
parent cb5660672a
commit 46ea4a65fe
2 changed files with 5 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ function drawMask(img, x, y, width, height, targetContext, imgMask, secondMask,
maskContext.globalCompositeOperation = "source-in"
}
}
console.log(width + ", " + height + " --- " + imgMask.width + ", " + imgMask.height + " --- " + img.width + ", " + img.height)
maskContext.drawImage(imgMask, 0, 0, width, height)
maskContext.globalCompositeOperation = "source-in"
if (img.src == undefined) {
@@ -24,4 +25,4 @@ function drawMask(img, x, y, width, height, targetContext, imgMask, secondMask,
maskContext.drawImage(img, 0, 0, width, height)
}
targetContext.drawImage(mask, x, y, width, height)
}
}