【生意多】-免费发布分类信息
当前位置: 首页 » 新闻 » 教程 » 操作系统 » 正文

渐变填充预设渐变(添加渐变填充)

放大字体  缩小字体 发布日期:2022-06-30 18:03:22    浏览次数:2
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();

结果:

注意 : 

 
(文/小编)
打赏
免责声明
• 
本文为小编原创作品,作者: 小编。欢迎转载,转载请注明原文出处:https://www.31duo.com/news/show-3574080.html 。本文仅代表作者个人观点,本站未对其内容进行核实,请读者仅做参考,如若文中涉及有违公德、触犯法律的内容,一经发现,立即删除,作者需自行承担相应责任。涉及到版权或其他问题,请及时联系我们。
 

(c)2016-2019 31DUO.COM All Rights Reserved浙ICP备19001410号-4

浙ICP备19001410号-4