大约有 103 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0051 秒)
...Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.clos...
来源: Laya_社区 发布时间: 20170920
...0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanvasWidthHeight(); let ctx = new Laya.Context(); // let w = canvasInfo.w//tex.width; // let h = canvasInfo.h//tex.height; let w = tex.width; let h = tex.height; ctx.size(w,h); ctx.asBitmap = true; // ctx.clearRect(0,0,w,h); let _...
来源: Laya_社区 发布时间: 20230328
Sprite中的width,height和size(width,height)感觉没作用啊 我的图片是800*600,懒得修改图片,想在程序中直接修改图片显示大小,可是貌似显示的还是800*600。width,height,size(width,height)是我理解问题,还是我写错了呢。。。。 ...
来源: Laya_社区 发布时间: 20160711
...ics.drawTexture(texture); //设置纹理宽高 this.img.size(texture.width, texture.height); <!-- 我想把加粗部分换成 this.img.graphics.drawTexture(Laya.loader.getRes(imgUrl),100,50,60,60); 为什么就不起作用了,switchImg()只执行了一次,不能实现切换图片 ...
来源: Laya_社区 发布时间: 20180226
...e.png"); button.size(50, 50); button.name = Dialog.CLOSE; button.pos(bgImg.width - button.width - 5, 5); dialog.addChild(button); dialog.dragArea = "0,0," + bgImg.width + "," + bgImg.height; dialog.show(); }; } Laya.class(LoadResource, "LoadResource", null);照着官方文档实例, 写了一个...
来源: Laya_社区 发布时间: 20200924
创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别 如题 2017-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Monica - 知识达人 赞同来自: 你是说在ID...
来源: Laya_社区 发布时间: 20171026
...:void { this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete)); Laya.stage.on(Laya.Event.RESIZE,this,this.onResize); } onComplete():void { this.onResize(); } onResize(...
来源: Laya_社区 发布时间: 20161116
...ctor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; //这里是我注释掉的代码 //Laya.lo...
来源: Laya_社区 发布时间: 20171106
...rite(); this._body.graphics.drawCircle(0, 0, this._objectInfo.templateInfo.width, "#ff0000"); this._body.width = this._objectInfo.templateInfo.width; this._body.height = this._objectInfo.templateInfo.height; this.addChild(this._body); this.on(Event.MOUSE_OVER, this, this.__onMouseOverHole); this.on(...
来源: Laya_社区 发布时间: 20180308
...edMap.createMap("res/tiledMap/t2.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } private onStageClick(): void { var p: Point = new Point(0, 0); ...
来源: Laya_社区 发布时间: 20201230