如何阻止進一步的陰影

開啟陰影后,畫布上的每個新繪圖都將被遮蔽。

通過將 context.shadowColor 設定為透明色來關閉進一步的陰影。

// start shadowing
context.shadowColor='black';

... render some shadowed drawings ...

// turn off shadowing.
context.shadowColor='rgba(0,0,0,0)';