使用路径arc

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>使用路径</title>
</head>
<body>
    <canvas >    ctx.beginPath();

    //添加一段圆弧
    ctx.arc(166, 166, 90, 0,Math.PI*0.6, true);
  
    //关闭路径
    ctx.closePath();

    //设置填充颜色
    ctx.strokeStyle = "#f00";

    //设置填充宽度
    ctx.lineWidth = 10;

    //填充当前路径
    ctx.stroke();


</script>
</body>
</html>


 

 

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2021-07-18
  • 2022-02-15
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案