Closed Jelim16 closed 2 years ago
Is it possible to somehow access tree structure of lunasvg::Document to find out how many sprites are inside?
No... Because DOM Tree
is destroyed after loading and the Layout Tree
is private. But since SVG
is the same XML
, you can use any XML library to do the job.
FYI I am currently working on a way to render individual element.
Example :
Bitmap Document::renderElement(std::string& id); // Renders an Element by ID onto the bitmap
Bitmap bitmap = document->renderElement("triangle"); // Renders an Element by the ID triangle onto the bitmap.
OK, thank you.
Hello, first of all I would like to thank you for this amazing library. I managed to build it with Visual Studio 2022 and use within MFC executable. Now I am trying to render some SVG sprites file into bitmap in order to load it into CImageList. Is it possible to somehow access tree structure of lunasvg::Document to find out how many sprites are inside?
Example of SVG with 3 separate sprites, each one to be loaded as single image in CImageList: