大约有 254 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0040 秒)
Laya_社区(200) Laya2.0_示例(15) Laya_示例(14) Laya2.0_文档(13) Laya3.0_api(5) Laya3.0_文档(3) laya_api(2) Laya2.0_api(2)
...graphics 绘制线条粗细一样 canvas 正常 版本最新 this.graphics.drawRect(0,0,100,100,null,"#000000",2) 效果: 代码: var sp:Sprite = new Sprite(); this.addChild(sp); sp.pos(200, 200); sp.graphics.d...
来源: Laya_社区 发布时间: 20180510
...Area怎么用 var container = new Sprite(); container.graphics.drawRect(0,0,640,1136,'#ff0000'); container.size(640,1136) Laya.stage.addChild(container); var bg2Sprite = new Sprite(); bg2Sprite.graphics.drawRect(0,0,...
来源: Laya_社区 发布时间: 20170223
...黄色区域 this.graphics.save(); this.graphics.alpha(0.5); this.graphics.drawRect(-40, -110, 80, 110, "#ffcc00"); this.graphics.restore(); //再画一个红色小半透明区域 this.graphics.save(); this.graphics.alpha(0.7); this.graphics.drawRect(40, -110, 80, 110, "#ff0000"); this.graphics.rest...
来源: Laya_社区 发布时间: 20161228
...laya.display.Sprite; con.addChild(sp); sp.x = 250; sp.y = 300; sp.graphics.drawRect(-50,-100,100,100,"#ff0000"); sp.hitArea = new laya.maths.Rectangle(-50,-100,100,100); sp.on(laya.events.Event.CLICK,this,this.spHandler); function spHandler() { sp.graphics.clear(); var rc:number = Ma...
来源: Laya_社区 发布时间: 20180106
...ction createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Even...
来源: Laya_示例 发布时间: 20241118
...cs:Graphics=new Graphics(); graphics.save(); graphics.alpha(0.5); graphics.drawRect(0,0,200,100,"#FF0000"); graphics.restore(); sp.graphics=graphics; Laya.stage.addChild(sp);实现graphics填充透明,请先对graphics进行save(),然后设置填充透明度值,其次绘制矢量图形,最后...
来源: Laya_社区 发布时间: 20161130
...rite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Even...
来源: Laya2.0_示例 发布时间: 20241118
... var blue:Sprite = new Sprite(); blue.graphics.drawRect(0, 0, 500, 500, "#004080"); blue.pos(150, 150); blue.size(500, 500); blue.on("click", this, onClick); Laya.stage.addChild(blue); ...
来源: Laya_社区 发布时间: 20161122
...ar h:int = 40; var btn:Sprite = new Sprite(); btn.size(w, h); btn.graphics.drawRect((stageWd - w) * 0.5, (stageHt - h) * 0.5-50, w, h, "#FF7F50"); btn.graphics.fillText("确 定", (stageWd) * 0.5 , (stageHt - h) * 0.5-43, "25px SimHei", "#FFFFFF", "center"); //dialog_mc.addChild(btn); Laya.stage.add...
来源: Laya_社区 发布时间: 20170120
...景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //设置叠...
来源: Laya_示例 发布时间: 20241118