rasterizeHTML.js icon indicating copy to clipboard operation
rasterizeHTML.js copied to clipboard

Fail to rasterize composite transforms

Open tqtran7 opened this issue 10 years ago • 3 comments

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/

tqtran7 avatar Jan 12 '15 00:01 tqtran7

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.

cburgmer avatar Jan 12 '15 23:01 cburgmer

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!

tqtran7 avatar Jan 13 '15 01:01 tqtran7

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/ )

domq avatar Jan 17 '23 14:01 domq