www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - NanoSVG port

reply ketmar <ketmar ketmar.no-ip.org> writes:
i also made NanoSVG[1] port[2]: simple SVG parser and rasterizer. 
it is using `malloc()` to allocate memory, but otherwise was 
rewritten to use `const(char)[]` input for svg, and do not use 
`sscanf()` from libc.

the port lives in NanoVG package, but it is actually completely 
independent.


[1] https://github.com/memononen/nanosvg
[2] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/nanovg/svg.d
Jul 09 2016
next sibling parent reply Dmitry <dmitry indiedev.ru> writes:
On Saturday, 9 July 2016 at 11:06:34 UTC, ketmar wrote:
 i also made NanoSVG[1] port[2]: simple SVG parser and 
 rasterizer. it is using `malloc()` to allocate memory, but 
 otherwise was rewritten to use `const(char)[]` input for svg, 
 and do not use `sscanf()` from libc.

 the port lives in NanoVG package, but it is actually completely 
 independent.


 [1] https://github.com/memononen/nanosvg
 [2] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/nanovg/svg.d
I will definitely try it (but not very soon). Thank you!
Jul 09 2016
parent ketmar <ketmar ketmar.no-ip.org> writes:
just make sure to download the latest version by the given link 
before you want to try it. ;-)

glad to see that you found it useful
Jul 09 2016
prev sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
also, i extended the original library a little: added rudimentary 
support for "style" tag and styling svg elements. nothing fancy, 
but many svgs found in internet are using that to avoid repeating 
"style" everywhere. it is a dirty hack (sorry), but makes even 
more svgs "renderable".
Jul 11 2016