大约有 796 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
...l里面呢? sp = new Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58...
来源: Laya_社区 发布时间: 20190530
...ight); } showFight(num: number): void { if (this._sprFight) this._sprFight.graphics.clear(); this._sprFight = bigao.utils.TextrueUtils.getNumberByUrl(resourcesCenter.ResourcesPathStr.FIGHT_NUMBER_PATH_PNG, num.toString()); this._sprFight.x = 600; this._sprFight.y = 150; this.addChild(this._sprFight)...
来源: Laya_社区 发布时间: 20170916
...; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝试 constructor() { Laya.init(1000,800); this.img = new Laya.Spr...
来源: Laya_社区 发布时间: 20180406
...ogressBar 第一个问题: UI下的skin是组件的皮肤,graphics.draw是draw的图片纹理 如果UI的组件为Image,更换Image的Skin和graphics.draw一张图片纹理效果是一样的 如果UI的组件为button等有点击状态的组件时,更...
来源: Laya_社区 发布时间: 20160729
LayaAir引擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd); this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)? 2018-01-24 添加评论 ...
来源: Laya_社区 发布时间: 20180124
...个环形图片的Image,作为底板 在上方放一个Box,在Box上用graphic画扇形 Box内部有一个同样的环形图片作为Box的mask 2017-12-11 0 3 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 您好,看了您的问题,有如下解决方法 组件中Graphics 中的Pie 组...
来源: Laya_社区 发布时间: 20171211
... // 保证customRender必定执行 this.frameLoop(1, this, () => { this.graphics.clear(); this.graphics.drawLine(0, 0, 1, 0, '#000'); }); this.customRenderEnable = true; this.customRender = (context: Laya.RenderContext, x: number, y: number) => { let webGLContext = context.ctx as Laya.WebGLCon...
来源: Laya_社区 发布时间: 20180728
...e(); imgSprite.x = 300 imgSprite.graphics.drawTexture(imgTextTure,0,0); avatarContainer.addChild(imgSprite); var mask = new Sprite(); mask.graphics.drawCircle(50,50,50,"#00ffff") ...
来源: Laya_社区 发布时间: 20170209
...法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } })(); ``` 运行...
来源: Laya2.0_文档 发布时间: 20210715
...unction CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw"; btn.addChild(text); Laya.stage.addChild(btn); btn.size(200,50); return btn; } //点击DrawToCanvas按钮,进行截屏 pr...
来源: Laya_社区 发布时间: 20170822