欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          arc函數(shù)在html5中什么意思

          arc函數(shù)在html5中是創(chuàng)建曲線的意思,是Canvas用于創(chuàng)建弧或者曲線的函數(shù);可以通過該函數(shù)創(chuàng)建圓,語法為“arc(定義一個(gè)中心點(diǎn),半徑,起始角度,結(jié)束角度,和繪圖方向:順時(shí)針或逆時(shí)針)”。

          arc函數(shù)在html5中什么意思

          本教程操作環(huán)境:windows10系統(tǒng)、HTML5版、Dell G3電腦。

          arc函數(shù)在html5中什么意思

          語法:arc(定義一個(gè)中心點(diǎn),半徑,起始角度,結(jié)束角度,和繪圖方向:順時(shí)針或逆時(shí)針)

          代碼:context.arc(centerX, centerY, radius, startingAngle, endingAngle, antiClockwise);

          arc() 方法創(chuàng)建弧/曲線(用于創(chuàng)建圓或部分圓)。

          示例如下:

          var c=document.getElementById("myCanvas");var ctx=c.getContext("2d"); ctx.beginPath(); ctx.arc(100,75,50,0,2*Math.PI); ctx.stroke();

          輸出結(jié)果:

          arc函數(shù)在html5中什么意思

          提示:如需通過 arc() 來創(chuàng)建圓,請(qǐng)把起始角設(shè)置為 0,結(jié)束角設(shè)置為 2*Math.PI。

          arc函數(shù)在html5中什么意思

          • 中心:arc(100,75,50,0*Math.PI,1.5*Math.PI)

          • 起始角:arc(100,75,50,0,1.5*Math.PI)

          • 結(jié)束角:arc(100,75,50,0*Math.PI,1.5*Math.PI)

          推薦教程:《html視頻教程》

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)