This commit is contained in:
Daniel Odendahl Jr
2018-04-17 19:32:06 +00:00
parent 9bb82d9575
commit fe9f20f085
+1 -2
View File
@@ -78,8 +78,7 @@ class CanvasUtil {
}
static drawImageWithTint(ctx, image, color, x, y, width, height) {
const fillStyle = ctx.fillStyle;
const globalAlpha = ctx.globalAlpha;
const { fillStyle, globalAlpha } = ctx;
ctx.fillStyle = color;
ctx.drawImage(image, x, y, width, height);
ctx.globalAlpha = 0.5;