rasterizeHTML.js
rasterizeHTML.js copied to clipboard
Fail to rasterize composite transforms
Hello, just wanted to say that you've done great work here! While using it to rasterize my game world onto the canvas, I noticed that composite transforms does not work. I have a link to jsfiddle below to show the example. My goal is to be able to bake this world and save it as an image for performance.
http://jsfiddle.net/E8fb2/203/
Thanks for the feedback, and interesting find. Actually the demo looks good to me in Firefox, it seems to be an issue in Chrome & Safari (the latter not showing anything at all when adding the -webkit-
vendor prefix).
The current bleeding edge version will also return the internal SVG representation when executing
rasterizeHTML.drawHTML(html, canvas).then(function (result) {console.log(result);});
This might be of help if you want to dig into the details. It might just be an issue in the Blink engine though - a minimum SVG test case might help debugging.
Also tested it on IE10, surprisingly only the incorrect rasterized image showed up. I have submitted a ticked to Chromium Blink, hopefully they will resolve it. I can just stick with using Firefox for capturing images for now. Thanks!
This can probably be closed now, as Firefox and Chrome appear to work the same way (updated fiddle at http://jsfiddle.net/dom_q/531cab9g/ )