使用 destination-over 在现有形状后面绘制
context.globalCompositeOperation = "destination-over"
目的地合成在现有图纸下放置新图纸。
context.drawImage(rainy,0,0);
context.globalCompositeOperation='destination-over'; // sunny UNDER rainy
context.drawImage(sunny,0,0);
context.globalCompositeOperation = "destination-over"
目的地合成在现有图纸下放置新图纸。
context.drawImage(rainy,0,0);
context.globalCompositeOperation='destination-over'; // sunny UNDER rainy
context.drawImage(sunny,0,0);