Hey @bharatbondu - thanks for asking! SVG export isn't built in to the library, but you could implement it by recording the stroke data and generating SVG paths from it. Have a look at the Programmatic Drawing section of the readme - essentially instead of then calling atrament.draw, you could use the stroke data to build a SVG path string.
N.B. SVG paths have uniform stroke thickness, so you'd have to find a way to render the variable thickness as well.
Please do let me know if you implement such a thing, I'd happily link to your code as a solution for future users :)
Hey @bharatbondu - thanks for asking! SVG export isn't built in to the library, but you could implement it by recording the stroke data and generating SVG paths from it. Have a look at the Programmatic Drawing section of the readme - essentially instead of then calling
atrament.draw
, you could use the stroke data to build a SVG path string.N.B. SVG paths have uniform stroke thickness, so you'd have to find a way to render the variable thickness as well.
Please do let me know if you implement such a thing, I'd happily link to your code as a solution for future users :)