大约有 130 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0037 秒)
...new Sprite(); redBox.pos(250,200); redBox.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,...
来源: Laya_社区 发布时间: 20170710
...黄色区域 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
... var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask2、动态遮罩 var sp:Sprite...
来源: Laya_社区 发布时间: 20170207
...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
...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
...透问题 //画矩形 this.addLabel = new Sprite(); this.addLabel.graphics.drawRect(0, 730, 1440, 170, "#000000"); this.addLabel.alpha = 0.6; this.addLabel.mousethrough = false; this.addLabel.mouseEnabled = true; sp.addChild(this.addLabel); 仍然能够点击下面的按钮.这个要怎么处理? 20...
来源: Laya_社区 发布时间: 20170726
...ot.__super.call(this); this.size(200,200); this.graphics.drawRect(0,0,200,200,'#123456'); var viewPort = new Rectangle(0,0,200,200); this.viewport = viewPort; var ccc = new Sprite(); ccc.graphics.drawRect(0,0,50,50,'#123000'); t...
来源: Laya_社区 发布时间: 20170323
...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
...常显示。 let bigMask:Laya.Sprite = new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000)....
来源: Laya_社区 发布时间: 20190722
...常显示。 let bigMask:Laya.Sprite = new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000)....
来源: Laya_社区 发布时间: 20190722