We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3358f3 commit faa9a20Copy full SHA for faa9a20
js/load-image.js
@@ -122,9 +122,14 @@
122
destX,
123
destY,
124
destWidth,
125
- destHeight
+ destHeight,
126
+ alpha
127
) {
- canvas.getContext('2d').drawImage(
128
+ var ctx = canvas.getContext('2d');
129
+ if (!!alpha)
130
+ ctx.globalAlpha = alpha;
131
+
132
+ ctx.drawImage(
133
img,
134
sourceX,
135
sourceY,
@@ -259,7 +264,8 @@
259
264
0,
260
265
261
266
262
267
268
+ options.alpha
263
269
);
270
}
271
img.width = destWidth;
0 commit comments