zoz○zo女人和另类zoz0,freeⅹ性欧美xvideos,中文字幕人妻一区二区三区熟女,97四房播播,av狼最新网址

大學(xué)生新聞網(wǎng),大學(xué)生新聞發(fā)布平臺
大學(xué)生新聞網(wǎng)
大學(xué)生新聞大學(xué)生活校園文學(xué)大學(xué)生村官
社會實(shí)踐活動社會實(shí)踐經(jīng)歷社會實(shí)踐報(bào)告社會實(shí)踐總結(jié)社會實(shí)踐心得
全國排名校友會版軟科排名分類排名本科排名一本排名二本排名?婆琶學(xué)校地址
求職簡歷職場法則面試技巧職場故事求職招聘大學(xué)生就業(yè)
英語學(xué)習(xí)計(jì)算機(jī)學(xué)習(xí)電氣工程機(jī)械工程經(jīng)濟(jì)管理建筑設(shè)計(jì)財(cái)務(wù)會計(jì)
申請書證明書檢討書自薦信演講稿心得體會調(diào)查報(bào)告讀后感求職信推薦信其它范文

小程序畫布創(chuàng)建一條弧線CanvasContext.arc

CanvasContext.arc(number x, number y, number r, number sAngle, number eAngle, boolean counterclockwise)
創(chuàng)建一條弧線。

小程序插件:支持
創(chuàng)建一個(gè)圓可以指定起始弧度為 0,終止弧度為 2 * Math.PI。
用 stroke 或者 <code>fill 方法來在 canvas 中畫弧線。
參數(shù)
number x
圓心的 x 坐標(biāo)

number y
圓心的 y 坐標(biāo)

number r
圓的半徑

number sAngle
起始弧度,單位弧度(在3點(diǎn)鐘方向)

number eAngle
終止弧度

boolean counterclockwise
弧度的方向是否是逆時(shí)針

示例代碼
const ctx = wx.createCanvasContext('myCanvas')
 
// Draw coordinates
ctx.arc(100, 75, 50, 0, 2 * Math.PI)
ctx.setFillStyle('#EEEEEE')
ctx.fill()
 
ctx.beginPath()
ctx.moveTo(40, 75)
ctx.lineTo(160, 75)
ctx.moveTo(100, 15)
ctx.lineTo(100, 135)
ctx.setStrokeStyle('#AAAAAA')
ctx.stroke()
 
ctx.setFontSize(12)
ctx.setFillStyle('black')
ctx.fillText('0', 165, 78)
ctx.fillText('0.5*PI', 83, 145)
ctx.fillText('1*PI', 15, 78)
ctx.fillText('1.5*PI', 83, 10)
 
// Draw points
ctx.beginPath()
ctx.arc(100, 75, 2, 0, 2 * Math.PI)
ctx.setFillStyle('lightgreen')
ctx.fill()
 
ctx.beginPath()
ctx.arc(100, 25, 2, 0, 2 * Math.PI)
ctx.setFillStyle('blue')
ctx.fill()
 
ctx.beginPath()
ctx.arc(150, 75, 2, 0, 2 * Math.PI)
ctx.setFillStyle('red')
ctx.fill()
 
// Draw arc
ctx.beginPath()
ctx.arc(100, 75, 50, 0, 1.5 * Math.PI)
ctx.setStrokeStyle('#333333')
ctx.stroke()
 
ctx.draw()


針對 arc(100, 75, 50, 0, 1.5 * Math.PI)的三個(gè)關(guān)鍵坐標(biāo)如下:

綠色: 圓心 (100, 75)
紅色: 起始弧度 (0)
藍(lán)色: 終止弧度 (1.5 * Math.PI)
    作者:大學(xué)生新聞網(wǎng)    來源:大學(xué)生新聞網(wǎng)
    發(fā)布時(shí)間:2025-04-14    閱讀:
    掃一掃 分享悅讀