📜  js在canvas上绘制canvas - Html代码示例

📅  最后修改于: 2022-03-11 14:53:19.981000             🧑  作者: Mango

代码示例3
#this code creates a circle within a canvas that must be created in HTML
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(95, 50, 40, 0, 2 * Math.PI);
ctx.stroke();