大约有 297 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0040 秒)
...: 与内容相关的链接 提交 1 个回复 ymsdandan 赞同来自: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var canvas:* = htmlCanvas.getCanvas();//获取原生的canvas对象 * trace(canvas.toDataURL("image/png"));//打印图片base64信...
来源: Laya_社区 发布时间: 20171121
...临风"; txt.pos(86, 15); txt.fontSize = 45; txt.color = "#000000"; var htmlCanvas:HTMLCanvas = p6_work.drawToCanvas(575, 1472, 0, 0); var canvas = htmlCanvas.getCanvas(); var base64 = canvas.toDataURL("image/png"); 为什么截屏里不包含txt呢?...
来源: Laya_社区 发布时间: 20180531
...as 2018-08-16 0 0 分享 微博 QZONE 微信 Laya_XS 赞同来自: * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var canvas:* = htmlCanvas.getCanvas();//获取原生的canvas对象 * trace(canvas.toDataURL("image/png"));//打印图片base64信...
来源: Laya_社区 发布时间: 20180706
...1:Sprite = new Sprite(); sp1.graphics.drawRect(0,0,300,200,"#ff0000"); var htmlCanvas:HTMLCanvas = sp1.drawToCanvas(300,200,0,0); Laya.timer.once(1000,this,function():void{ var texture:Texture = new Texture(htmlCanvas); var sp2:Sprite = new Sprite(); sp2.graphics.drawTexture(texture); Laya.stage.add...
来源: Laya_社区 发布时间: 20181121
...深 在联想k52e78测试发现如下代码绘图颜色变深。 var htmlC:HTMLCanvas = Laya.stage.drawToCanvas(750,1183,0,0); var canvas:* = htmlC.getCanvas();//获取原生的canvas对象 var base64String:String = canvas.toDataURL("image/png"); var _webframe:*; _webframe = Browser.document.createE...
来源: Laya_社区 发布时间: 20180103
...高。 我想从canvas那里获得imageData,但是调用获取不到 let htmlCanvas: Laya.HTMLCanvas = this.sprites[i].drawToCanvas(this.sprites[i].width, this.sprites[i].height, 0, 0); let canvas = htmlCanvas.getCanvas(); let context = canvas.getContext('2d'); var imageData = context.getImageData...
来源: Laya_社区 发布时间: 20170824
...相同,这是为什么? 我的layaair(as3)1.7.19.1beta代码: var htmlCanvas:HTMLCanvas = p6_work.drawToCanvas(575, 102, 0, 0); var canvas = htmlCanvas.getCanvas(); var base64 = canvas.toDataURL("image/png"); H5中代码: <img src="base64:xxxxxxxxxxxxx" alt="" class="work-img"&g...
来源: Laya_社区 发布时间: 20180712
...上截图不完整,只有原来的1/4多一点, let htmlCanvas: Laya.HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0); let base64Img = htmlCanvas.toBase64("image/png", 0.8); 而 关闭...
来源: Laya_社区 发布时间: 20201019
...回复 Laya_XS 赞同来自: /** * 生成图片到相册或截屏 */ var htmlCanvas:HTMLCanvas= box.drawToCanvas(1280,720,0,0);//其中box是一个容器 var canvas:Object = htmlCanvas.getCanvas(); var imagePath:String;// = canvas.toTempFilePathSync(); canvas.toTempFilePath({ x: 0, y: 0, width: 1280...
来源: Laya_社区 发布时间: 20190515
...位置信息,大概代码就是这样 if(Browser.onMiniGame) { try { var htmlCanvas:HTMLCanvas= box.drawToCanvas(1280,720,0,0); var canvas:Object = htmlCanvas.getCanvas(); var imagePath:String;// = canvas.toTempFilePathSync(); canvas.toTempFilePath({ x: 0, y: 0, width: 1280, height: 720, destWidth...
来源: Laya_社区 发布时间: 20180830