Xantomen/GamesInputPal

Feature Request: Explore being able to export the image as a .png with a transparent background

Xantomen opened this issue · 1 comments

I just checked, you can use ctx.drawImage(img, 0, 0); to draw an svg into a html5 canvas element - this oculd be useful if you want to create exportable png images (http://jsfiddle.net/Na6X5/ + http://stackoverflow.com/questions/11112321/how-to-save-canvas-as-png-image) -Stefan

Done, with possible improvements!

Using html2canvas library.

Lines dissapeared after rendering, so had to add code to the htmlcanvas event to remove and readd the pertinent class to the Lines. Also controlling in prepareContainerToPrint that things like sort-handles don't show in the print version.

In other cases, might need this fix: cloakedninjas/html2canvas@0bfd4a4