日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)小程序教程:微信小程序API繪圖beginPath(開始一個路徑)

繪圖接口和方法

canvasContext.beginPath


定義

開始創(chuàng)建一個路徑,需要調(diào)用fill或者stroke才會使用路徑進(jìn)行填充或描邊。

Tip: 在最開始的時候相當(dāng)于調(diào)用了一次beginPath()。

Tip: 同一個路徑內(nèi)的多次setFillStyle()setStrokeStyle()、setLineWidth()等設(shè)置,以最后一次設(shè)置為準(zhǔn)。

例子

const ctx = wx.createCanvasContext('myCanvas')
// begin path
ctx.rect(10, 10, 100, 30)
ctx.setFillStyle('yellow')
ctx.fill()

// begin another path
ctx.beginPath()
ctx.rect(10, 40, 100, 30)

// only fill this rect, not in current path
ctx.setFillStyle('blue')
ctx.fillRect(10, 70, 100, 30)

ctx.rect(10, 100, 100, 30)

// it will fill current path
ctx.setFillStyle('red')
ctx.fill()
ctx.draw()

繪圖接口和方法


網(wǎng)頁標(biāo)題:創(chuàng)新互聯(lián)小程序教程:微信小程序API繪圖beginPath(開始一個路徑)
當(dāng)前網(wǎng)址:http://www.dlmjj.cn/article/cojsogo.html