Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现这段代码可以在 Canvas 元素中的弧上键入。我已经将它基本修改为我需要的,但我不确定如何更改它的“起点”?
我在这里有一个演示
circle = { x: cnv.width / 2, // x coordinate of center y: cnv.height / 2, // y coordinate of center r: 150, lw: 75 };
例如,如下给出的将在画布的原点绘制它
circle = { x: 0, // x coordinate of center y: 0, // y coordinate of center r: 150, lw: 75 };