使用 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);