Egret之漸變填充

        this.bgShape = new egret.Shape();
        this.bgShape.width = w;
        this.bgShape.height = h;
        let $max: egret.Matrix = this.bgShape.matrix;
        $max.a = $max.d = 0;
        $max.c = $max.b = 1;
        this.bgShape.graphics.beginGradientFill(egret.GradientType.LINEAR, [0xFF0000, 0xD7F0FC], [1.0, 1.0], [0, this.bgShape.height / 3], $max);
        this.bgShape.graphics.drawRoundRect(0, 0, this.bgShape.width, this.bgShape.height, 40, 40);
        this.bgShape.graphics.endFill();

結果:
Egret之漸變填充

注意 :
Egret之漸變填充

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章