I have a canvas,I draw on it and i creat svg dynamically on it to enter text.I want to save it as an image.
I tried using xmlhttprequest using canvas.toDataURL() and file_put_content in the php code but only canvas with drawing is saved and svg text goes away?
Is there any way to combine both together and save as one image on disk?
I have a canvas,I draw on it and i creat svg dynamically on it
Share
SVG image can be drawn on
<canvas>but there are cross-origin request concerns and only some of the latest beta browsers can dotoDataURL()for such<canvas>.Example code:
https://github.com/miohtama/Krusovice/blob/master/src/tools/html2svg2canvas.js