|
|
|
|
|
by Someone1234
3932 days ago
|
|
You could use this to convert from SVG to a Canvas element and then from Canvas to an image (via canvas.toDataURL("image/png")): https://github.com/gabelerner/canvg Still needs a very newish browser however. No IE 6-8 (& 9?) support. |
|
Then it gets weirder because RaphaelJS isn't exactly responsive-ready. Takes some work to make graphics just resizable (you can scale with the viewbox, but that's about it.) Recently, I switched to pure SVG (even when programmatically generated) because nested SVG elements provide basically a mechanism for relative/responsive scaling, positioning and such.
The guy who came up with RaphaelJS was ahead of his time, and I believe he got hired by Adobe in part thanks to the project's exposure. The development stopped awhile back, and it shows, which is really sad because I liked how the programming style for Raphael is done.