在联想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.createElement("img");
_webframe.setAttribute('src', base64String);
//_webframe.setAttribute('frameborder', 0);
_webframe.setAttribute('width', "100%");
_webframe.setAttribute('height', "100%");
//_webframe.setAttribute('align', "middle");
_webframe.setAttribute('scrolling', "no");
_webframe.setAttribute('position', "absolute");
_webframe.setAttribute('style', "z-index:100001;position: absolute; left: 0px; top: 0px; background: rgb(0, 0, 0);");
Browser.document.body.appendChild(_webframe);
下面图片左边是正产机型截图,右边是联想手机截图。已测试jepg和png格式结果都一样。
