Draw image with configured opacity

This commit is contained in:
Maximilian Krög
2020-02-18 13:23:49 +01:00
parent 5ea0b52ba8
commit ab9d7cdc70

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);
}