Cax 內(nèi)置 Graphics

2018-06-21 11:14 更新

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

  1. const graphics = new cax.Graphics()
  2. graphics
  3. .beginPath()
  4. .arc(0, 0, 10, 0, Math.PI * 2)
  5. .closePath()
  6. .fillStyle('#f4862c')
  7. .fill()
  8. .strokeStyle('black')
  9. .stroke()
  10. graphics.x = 100
  11. graphics.y = 200
  12. stage.add(graphics)
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)