Brucey 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
..
3rdparty 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
include 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
source 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
.gitignore 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
CMakeLists.txt 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
LICENSE 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
README.md 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
luna.png 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci
svg2png.cpp 6d9fe0abc4 Changed to use lunasvg instead of nanosvg před 10 měsíci

README.md

Releases License Build Status

LunaSVG - SVG rendering library in C++

LunaSVG

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

By enabling the LUNASVG_BUILD_EXAMPLES option during the CMake configuration, the lunasvg build includes a simple SVG to PNG converter for easy conversion of SVG files to PNG format.

Run Demo.

svg2png [filename] [resolution] [bgColor]

Projects Using LunaSVG