大约有 164 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0051 秒)
...二次贝塞尔曲线,开发者可以在API文档中搜索laya.display.Graphics类可以查看到“drawCurves();”曲线绘制方法。该方法的详细说明如下图所示:  (图8) 下面我们用LayaAir引擎绘制矢量曲线,示例代码如下: ```ja...
来源: Laya2.0_文档 发布时间: 20210714
...法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } } } ```...
来源: Laya2.0_文档 发布时间: 20210714
...ite() { Laya.loader.load("../src/img/testImg.png",Laya.Handler.create(this,graphicsImg)); } function graphicsImg() { //临时sprite var img = new Laya.Sprite(); //img.graphics.drawTexture(Laya.loader.getRes(("../src/img/testImg.png"),0,0)); //获取图片资源 var tex = Laya.loader.getRes("../src/i...
来源: Laya_社区 发布时间: 20180413
...信 watsonsong 赞同来自: 是指的不用贴图,直接每一帧用sp.graphics.drawRect去绘制一个带颜色的矩形么? 2018-01-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 watsonsong 相关问题 btn 鼠标移动上去...
来源: Laya_社区 发布时间: 20180113
...testSp = new Laya.Sprite(); testSp.width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = testSp.width; tmpMask.height = testSp.height; tmpMask.graphics.clear(); tmpMask.graphic...
来源: Laya_社区 发布时间: 20200421
...二次贝塞尔曲线,开发者可以在API文档中搜索laya.display.Graphics类可以查看到“drawCurves();”曲线绘制方法。该方法的详细说明如下图所示:  (图8) 下面我们用LayaAir引擎绘制矢量曲线,示例代码如下: ```ja...
来源: Laya2.0_文档 发布时间: 20210715
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); var rect1 = new Sprite(); rect1.graphics.drawRect(Laya.stage.width / 3 * 2 , Laya.stage.height / 3 * 2 - 65, 100, 100, "blue"); // rect1.graphics.dra...
来源: Laya_社区 发布时间: 20170206
...ite(); this.sprite.on('mousedown', this, on_down); this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2); this.sprite.graphics.drawCircle(x, y, r1, color1, color1, 0); function on_down(event) { console.log("_____ kbRing2\n"); } } function laya_test()...
来源: Laya_社区 发布时间: 20161221
...法绘制图片并添加到舞台 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
...t: Texture = Laya.loader.getRes("load/0.png"); this.darwSprite.graphics.drawTexture(t,0,0); this.darwSprite.graphics.drawTexture(t,176,0); this.darwSprite.graphics.drawTexture(t,176*2,0); 采用这方式在sprite内部绘制了3个一样的png,每一个宽度...
来源: Laya_社区 发布时间: 20160718