大约有 185 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0041 秒)
...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( this.dragRegion.x, this.dragRegion.y, this.dragRegion.width, this.dragRegion.height, null, "#FFFFFF", 2); } private onStartDrag(e: Event): void { //鼠标按下开始拖拽(设置了拖动区域和超界弹回的滑...
来源: Laya_社区 发布时间: 20171106
为什么显示不了 var sp = new Laya.Sprite(); sp.graphics.drawRect(this.mouse_x, this.mouse_y, 10, 10, "#ff0000"); //var htmlC:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0).getCanvas().toDataURL(); var htmlCanvas:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0); var texture:Laya.Texture = new La...
来源: Laya_社区 发布时间: 20180412
... laya.display.Graphics 类可以查看到API的各种矢量绘图方法。 drawRect fillText drawPath drawCircle drawPie drawLine drawLines drawPoly drawCurves ...... 下面将对这些Graphics进行讲解。 二、绘制矩形与圆角矩形 2.1 IDE绘制矩形 在Sprite对象的 Graphics 组件中...
来源: Laya3.0_文档 发布时间: 20241014
...r2.texture = tempSpr.texture; // tempSpr2.graphics.drawRect(0,0,100,500,"#ff00ff"); //tempSpr2.scaleY = -1; tempSpr2.y = 100; // tempSpr2.scaleY = -1; // tempSpr2.y = maxY + GameMa...
来源: Laya_社区 发布时间: 20170508
....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.graphics.drawRect(0, 0, testSp.width, tes...
来源: Laya_社区 发布时间: 20200421
...ght / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") this.sp.graphics.drawRect(-this.sp.pivotX, -this.sp.pivotY, width, height, undefined, "#00ff00", 1) this.sp.pos(500, 500) Laya.stage.addChild(this.sp); } } new GameMain();这是运行截图,发现中心点的位置并不是(500, 500) 附...
来源: Laya_社区 发布时间: 20171230
..., HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.addChild(this.input); this.input.x = 50; this.input.text = 'place holder'; // this.graphics.draw...
来源: Laya_社区 发布时间: 20180312
...unction createInteractiveTarget() { var rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2691E"); rect.size(200, 200); rect.x = (Laya.stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHan...
来源: Laya_示例 发布时间: 20241118
...Child(panel); var sp:Sprite=new Sprite();//panel的子容器sp sp.graphics.drawRect(0,0,500,1000,"#FF0000"); sp.size(500,1000); panel.addChild(sp); var btnAdd:Button=new Button();//点击按钮,动态添加sp的子对象,并改变子对象sp的宽高 btnAdd.skin='button-4.png'; Laya.stage.addChi...
来源: Laya_社区 发布时间: 20170601
...= Laya.Event, Sprite = Laya.Sprite; let rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2691E"); rect.size(200, 200); rect.x = (Laya.stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mou...
来源: Laya2.0_示例 发布时间: 20241118