Cax 內(nèi)置 Graphics

2018-06-21 11:14 更新

繪圖對象,用于使用基本的連綴方式的 Canvas 指令繪制圖形。

const graphics = new cax.Graphics()
graphics
    .beginPath()
    .arc(0, 0, 10, 0, Math.PI * 2)
    .closePath()
    .fillStyle('#f4862c')
    .fill()
    .strokeStyle('black')
    .stroke()


graphics.x = 100
graphics.y = 200


stage.add(graphics)
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號