<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 圓形與圓弧 **arc()** 繪制圓弧或者圓,我們使用`arc()`方法 ``` arc(x, y, radius, startAngle, endAngle, anticlockwise) ``` - x:圓弧中心(圓心)的 x 軸坐標。 - y:圓弧中心(圓心)的 y 軸坐標。 - radius:圓弧的半徑。 - startAngle:圓弧的起始點, x軸方向開始計算,單位以弧度表示。 - endAngle:圓弧的終點, 單位以弧度表示。 - anticlockwise 可選:可選的Boolean值 ,如果為 true,逆時針繪制圓弧,反之,順時針繪制。 注意:`arc()`函數中的角度單位是弧度,不是度數。角度與弧度的js表達式: ``` radians=(Math.PI/180)*degrees。 ``` 實例:canvas-demo/arc.html: ``` cxt.beginPath(); cxt.arc(70,70,50,0,Math.PI/2,true); cxt.stroke(); cxt.beginPath(); cxt.arc(180,70,50,0,Math.PI/2,false); cxt.stroke(); cxt.beginPath(); cxt.arc(300,70,50,0,Math.PI/2,true); cxt.fill(); cxt.beginPath(); cxt.arc(400,70,50,0,Math.PI/2,false); cxt.fill(); ``` **arcTo()** `arcTo()`方法用于在畫布上創建介于兩個切線之間的弧/曲線。 ``` arcTo(x1, y1, x2, y2, radius) ``` - x1:第一個控制點的 x 軸坐標。 - y1:第一個控制點的 y 軸坐標。 - x2:第二個控制點的 x 軸坐標。 - y2:第二個控制點的 y 軸坐標。 - radius:圓弧的半徑。 實例:canvas-demo/arcTo.html: ``` <canvas id="canvas" width="400" height="300"> 不支持canvas </canvas> <script> var canvas = document.getElementById('canvas'); var ctx = ''; ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.beginPath(); ctx.moveTo(20,20); ctx.lineTo(100,20); ctx.arcTo(150,20,150,70,50); ctx.lineTo(150,120); ctx.stroke(); </script> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看