Merge pull request #10694 from M393/image-opacity

Draw image with configured opacity
This commit is contained in:
Tim Schaub
2020-02-19 06:59:33 -07:00
committed by GitHub
4 changed files with 80 additions and 0 deletions

View File

@@ -404,6 +404,9 @@ export function drawImageOrLabel(context,
transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {
context.save();
if (opacity !== 1) {
context.globalAlpha *= opacity;
}
if (transform) {
context.setTransform.apply(context, transform);
}