zoukankan      html  css  js  c++  java
  • arc路径例子-磊哥

        
       <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>使用路径</title>
    </head>
    <body>
        <canvas id="ourCanvas" width="500" height="500" style="border:3px dashed #0094ff;"></canvas>
    <script>
        var canvas = document.getElementById("ourCanvas");
        var ctx = canvas.getContext("2d");

        ctx.strokeStyle = "#163B62";
        ctx.beginPath();
        ctx.arc(70, 70, 40, Math.PI*0.3, Math.PI * 0.8, false);
        ctx.stroke();

        ctx.strokeStyle = "#000000";
        ctx.beginPath();
        ctx.arc(160, 70, 40, Math.PI * 0.55, Math.PI * 0.7, false);
        ctx.stroke();

        ctx.strokeStyle = "#000000";
        ctx.beginPath();
        ctx.arc(160, 70, 40, -Math.PI * 0.1, Math.PI * 0.1, false);
        ctx.stroke();
           
        ctx.strokeStyle = "#BF0628";
        ctx.beginPath();
        ctx.arc(250, 70, 40, Math.PI * 0.55, Math.PI * 0.7, false);
        ctx.stroke();
     

     

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

  • 相关阅读:
    2019.7.28刷题统计
    2019.7.27刷题统计
    2019.7.26刷题统计
    2019.7.22刷题统计
    qdoj.xyz 6.18
    qdoj.xyz 6.17
    qdoj.xyz 6.16
    qdoj.xyz 6.15
    qdoj.xyz 6.14
    qdoj.xyz 6.13
  • 原文地址:https://www.cnblogs.com/xiaoleidiv/p/3171640.html
Copyright © 2011-2022 走看看