亲 你一定是偷懒少加了
beginPath()
https://www.w3school.com.cn/tags/canvas_beginpath.asp
在 moveTo起始点加上
beginPath()
本文指出在使用Canvas绘图时容易忽略的关键步骤——调用beginPath()方法。该方法用于开始一条新的路径,对于正确绘制图形至关重要。文章通过一个具体示例说明了如何在moveTo方法之前加入beginPath()来确保路径正确绘制。
亲 你一定是偷懒少加了
beginPath()
https://www.w3school.com.cn/tags/canvas_beginpath.asp
在 moveTo起始点加上
beginPath()