mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
2c16a78282
f924651b8 Merge pull request #129 from lemirep/master db27b7c0e Add missing cstdint include b66e22402 Merge pull request #126 from m-carrasco/fix-null-ptr-arithmetic a1edbff60 Merge pull request #125 from m-carrasco/fix-ub-memcpy f595f7be3 Fix UB caused by null pointer arithmetic. a854444e5 Fix UB caused by wrong call to memcpy. b7e72fb37 Merge pull request #84 from seanharmer/master 4c16abf41 Merge pull request #123 from m-carrasco/fix-gradient-ub 4d51541c2 Fix undefined behavior caused by a domain error on an sqrt call. d4a7080cf Merge pull request #1 from seanharmer/cmake_modernization b08d7d03a Relax the cmake version and other improvements 33a458302 Modernize the cmake usage 4b2609c14 Add initial .gitignore git-subtree-dir: external/lunasvg git-subtree-split: f924651b85cac47dbe15f51a4aa320461fc1d07b |
||
---|---|---|
.github | ||
3rdparty/plutovg | ||
cmake | ||
example | ||
include | ||
source | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE | ||
luna.png | ||
README.md |
If you like the work lunasvg is doing please consider a small donation :
LunaSVG - SVG rendering library in C++
Example
#include <lunasvg.h>
using namespace lunasvg;
int main()
{
auto document = Document::loadFromFile("tiger.svg");
auto bitmap = document->renderToBitmap();
// do something useful with the bitmap here.
return 0;
}
Features
- Basic Shapes
- Document Structures
- Coordinate Systems, Transformations and Units
- SolidColors
- Gradients
- Patterns
- Masks
- ClipPaths
- Markers
- StyleSheet
TODO
- Texts
- Filters
- Images
Build
git clone https://github.com/sammycage/lunasvg.git
cd lunasvg
mkdir build
cd build
cmake ..
make -j 2
To install lunasvg library.
make install
Demo
While building lunasvg example it generates a simple SVG to PNG converter which can be used to convert SVG file to PNG file.
Run Demo.
svg2png [filename] [resolution] [bgColor]