• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 164 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0051 秒)

51. 绘制曲线(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 78%]

...二次贝塞尔曲线,开发者可以在API文档中搜索laya.display.Graphics类可以查看到“drawCurves();”曲线绘制方法。该方法的详细说明如下图所示: ​ ![blob.png](img/3.png) ​ (图8) 下面我们用LayaAir引擎绘制矢量曲线,示例代码如下: ```ja...

来源: Laya2.0_文档 发布时间: 20210714

52. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 78%]

...法绘制图片并添加到舞台 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

53. htmlCanvas 像素级操作 [ 78%]

...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

54. Image控件可以设置颜色么? [ 77%]

...信 watsonsong 赞同来自: 是指的不用贴图,直接每一帧用sp.graphics.drawRect去绘制一个带颜色的矩形么? 2018-01-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 watsonsong 相关问题 btn 鼠标移动上去...

来源: Laya_社区 发布时间: 20180113

55. 显示对象的mask缩放为0时遮罩效果不生效 [ 77%]

...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

56. 绘制曲线(JavaScript-LayaAir基础篇(JS)-矢量图) [ 77%]

...二次贝塞尔曲线,开发者可以在API文档中搜索laya.display.Graphics类可以查看到“drawCurves();”曲线绘制方法。该方法的详细说明如下图所示: ​ ![blob.png](img/3.png) ​ (图8) 下面我们用LayaAir引擎绘制矢量曲线,示例代码如下: ```ja...

来源: Laya2.0_文档 发布时间: 20210715

57. 关于适配有点疑惑 [ 76%]

...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

58. 绘制形状时事件不触发 [ 76%]

...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

59. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 76%]

...法绘制图片并添加到舞台 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

60. 图片通过drawTexture平铺出现缝隙 [ 76%]

...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