Egret之渐变填充
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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之渐变填充的主要内容,如果未能解决你的问题,请参考以下文章