[]这种进度条怎么实现?

绘制扇形我知道!但是怎么把中间不想显示的东西抠掉呢?
 
已邀请:

q1402907210 - 你猜猜

赞同来自: Yangcy

序列帧,找美术做!

a573859380

赞同来自:

图片怎么传不上去?
 

a573859380

赞同来自:

就是圆形的中间空的进度条
 

135*****574

赞同来自:

665123.gif

 

Barry Allen

赞同来自:

 
import Sprite = Laya.Sprite

export default class Test extends Sprite{

public DEF_SIZE: number = 200
public CIRCLE_WIDTH: number = 20
public $circleSprite: Sprite = new Sprite()
public startY: number = -90


constructor() {
super()
this._init()
}

private _init() {
this.cacheAs = "bitmap"
this.size(this.DEF_SIZE,this.DEF_SIZE)
this.pos(200,200)
this.cacheAs = "bitmap"
this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000')
this.$circleSprite.blendMode = "destination-out"
this.$circleSprite.pos(this.CIRCLE_WIDTH >> 1,this.CIRCLE_WIDTH >> 1)
this.$circleSprite.graphics.clear()
this.$circleSprite.graphics.drawCircle((this.DEF_SIZE - this.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - this.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff")
this.addChild(this.$circleSprite)
this.start()
}


public start() {
this.timerLoop(2, this, this.draw)
}

public draw() {
if (this.startY >= 270) {
this.clearTimer(this, this.draw)
}
this.startY++
this.graphics.clear()
this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000')
}
}
Laya.stage.addChild(new Test())

Barry Allen

赞同来自:

多看看文档这么简单的一个问题几个月都弄不出来

要回复问题请先

商务合作
商务合作