首页 > 其他 > 详细

Egret之渐变填充

时间:2020-01-11 20:58:29      阅读:324      评论:0      收藏:0      [点我收藏+]
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之渐变填充

原文:https://blog.51cto.com/aonaufly/2466113

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!