大约有 229 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
Laya_社区(174) Laya2.0_示例(20) Laya_示例(18) Laya2.0_文档(9) Laya3.0_api(3) Laya3.0_文档(3) laya_api(1) Laya2.0_api(1)
...wCurves drawEllipse drawImage drawLine drawLines drawPath drawPie drawPoly drawRect drawTexture drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate Constructors constructor new Graphics(): Graphics Defi...
来源: Laya3.0_api 发布时间: 20231115
...有不明白的我们再沟通!var sp1:Sprite=new Sprite(); sp1.graphics.drawRect(0,0,200,400,"#FF0000"); Laya.stage.addChild(sp1); var sp2:Sprite=new Sprite(); sp2.graphics.drawRect(0,0,300,400,"#0000FF"); sp2.pos(100,100); if(sp1.getBounds().intersects(sp2.getBounds())) { trace("相交了"); }...
来源: Laya_社区 发布时间: 20161202
...; // 创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "#FF0000"; this.btn.addChild(this.txt); this.btn.pos(...
来源: Laya2.0_示例 发布时间: 20251130
...s/ getGraphicBounds。 ```javascript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容...
来源: Laya2.0_文档 发布时间: 20210715
... laya.display.Graphics 类可以查看到API的各种矢量绘图方法。 drawRect fillText drawPath drawCircle drawPie drawLine drawLines drawPoly drawCurves ...... 下面将对这些Graphics进行讲解。 二、绘制矩形与圆角矩形 2.1 IDE绘制矩形 在Sprite对象的 Graphics 组件中...
来源: Laya3.0_文档 发布时间: 20251010
...00; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event ...
来源: Laya2.0_示例 发布时间: 20251130
...Texture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count++; } } 2018-11-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: ...
来源: Laya_社区 发布时间: 20181113
....addChild(box); // 绘制红色方块 var red = new Sprite(); red.graphics.drawRect(0, 0, 150, 150, "#ff0000"); box.addChild(red); // 绘制一个圆形区域,利用叠加模式,抠除上面红色区域 var circle = new Sprite(); circle.graphics.drawCircle(0, 0, 50, "#000"); circle.pos(50, 50); ...
来源: Laya_社区 发布时间: 20170707
...w Laya.Sprite(); this.firstSp = new Laya.Sprite(); this.firstSp.graphics.drawRect(0, -100, 200, 200, null, "#ffffff"); this.firstSp.graphics.drawLine(0, 0, 100, 100, "#ffffff", 5); this.firstSp.graphics.drawCircle(100, 100, 20, null, "ffffff"); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.Mous...
来源: Laya_社区 发布时间: 20190314
...偏复杂。 另一个是sprite.mouseThrough = true;加上sprite.graphics.drawRect。但是遇到个问题是sprite.graphics多了好像我的小米2s会掉帧(十几个150*100的矩形就掉到55以下)。 那么问题来了,有什么简单的确实可行的方案能让负坐标能触发点...
来源: Laya_社区 发布时间: 20170105