HTML5 Canvas, shadowColor & shadowBlur

后端 未结 3 1709
抹茶落季
抹茶落季 2021-01-19 14:52

My question is regarding this shadowBlur feature used on the 2nd (outer) rectangle below. The shadowBlur feature is applied to every shape after this rectangle. (If

3条回答
  •  一向
    一向 (楼主)
    2021-01-19 15:00

        var canvas3=document.getElementById("myCanvas");
        var ctx3=canvas1.getContext("2d");
    

    change canvas1 to canvas3 in the second line. Your ctx3 is actually pointing to canvas1 which i think is wrong.

提交回复
热议问题