Find a file
Leon Styhre 0d52738239 Squashed 'external/lunasvg/' changes from d13d8e521..e0f786c9b
e0f786c9b Fix parseStyle
REVERT: d13d8e521 Refactoring
REVERT: 4925c87a8 Update
REVERT: 794c38591 Update
REVERT: 49eee9643 Update
REVERT: 914aee5ea Update
REVERT: 3bb00ecee Fix ParserString string-view iterator cast in windows
REVERT: fabea2008 Fix string-view iterator cast in windows
REVERT: bbcf0d34f Update
REVERT: 081df20f2 Update
REVERT: fe3101f91 Refactoring
REVERT: e9a41dc83 Refactoring

git-subtree-dir: external/lunasvg
git-subtree-split: e0f786c9be6fae1ffabddfe56fb1e0a1a7eb775d
2022-10-03 23:55:09 +02:00
.github Squashed 'external/lunasvg/' content from commit 7417baa0a 2022-10-03 18:25:42 +02:00
3rdparty Squashed 'external/lunasvg/' changes from 7417baa0a..d13d8e521 2022-10-03 20:53:48 +02:00
example Squashed 'external/lunasvg/' content from commit 7417baa0a 2022-10-03 18:25:42 +02:00
include Squashed 'external/lunasvg/' changes from 7417baa0a..d13d8e521 2022-10-03 20:53:48 +02:00
source Squashed 'external/lunasvg/' changes from d13d8e521..e0f786c9b 2022-10-03 23:55:09 +02:00
CMakeLists.txt Squashed 'external/lunasvg/' changes from d13d8e521..e0f786c9b 2022-10-03 23:55:09 +02:00
LICENSE Squashed 'external/lunasvg/' content from commit 7417baa0a 2022-10-03 18:25:42 +02:00
luna.png Squashed 'external/lunasvg/' content from commit 7417baa0a 2022-10-03 18:25:42 +02:00
README.md Squashed 'external/lunasvg/' content from commit 7417baa0a 2022-10-03 18:25:42 +02:00

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

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]

Projects Using LunaSVG

Support Me

If you like the work lunasvg is doing please consider a small donation :

Donate Donate Sponsor