84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
canvas 先铺了个背景色 然后 用quadraticCurveTo 画了个圈 填充透明色
为什么会把背景色透过来,没擦除么?
我做的是一个很Q的 圆形弹力的 貌似clearRect 不好使
业精于勤,荒于嬉;行成于思,毁于随。
你需要设置 ctx.globalCompositeOperation = "xor" 然后再画图。
ctx.globalCompositeOperation = "xor"
详见 MDN 的文档:https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Compositing
你需要设置
ctx.globalCompositeOperation = "xor"
然后再画图。详见 MDN 的文档:https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Compositing