Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sammycage/lunasvg
SVG rendering and manipulation library in C++
https://github.com/sammycage/lunasvg
cpp css plutovg png svg svg2png
Last synced: about 2 months ago
JSON representation
SVG rendering and manipulation library in C++
- Host: GitHub
- URL: https://github.com/sammycage/lunasvg
- Owner: sammycage
- License: mit
- Created: 2020-03-25T11:13:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-22T11:49:59.000Z (2 months ago)
- Last Synced: 2024-10-23T07:41:24.341Z (2 months ago)
- Topics: cpp, css, plutovg, png, svg, svg2png
- Language: C++
- Homepage:
- Size: 1.75 MB
- Stars: 886
- Watchers: 28
- Forks: 124
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesomecpp - lunasvg - - standalone c++ library to create, animate, manipulate and render SVG files. (Graphics)
README
[![Releases](https://img.shields.io/badge/Version-2.3.9-orange.svg)](https://github.com/sammycage/lunasvg/releases)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sammycage/lunasvg/blob/master/LICENSE)
[![Build Status](https://github.com/sammycage/lunasvg/actions/workflows/ci.yml/badge.svg)](https://github.com/sammycage/lunasvg/actions)# LunaSVG - SVG rendering library in C++
![LunaSVG](https://github.com/sammycage/lunasvg/blob/master/luna.png)
## Example
```cpp
#includeusing 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
- [OpenSiv3D](https://github.com/Siv3D/OpenSiv3D)
- [PICsimLab](https://github.com/lcgamboa/picsimlab)
- [MoneyManagerEx](https://github.com/moneymanagerex/moneymanagerex)
- [RmlUi](https://github.com/mikke89/RmlUi)
- [ObEngine](https://github.com/ObEngine/ObEngine)
- [OTTO](https://github.com/bitfieldaudio/OTTO)
- [EmulationStation-DE](https://gitlab.com/es-de/emulationstation-de)
- [SvgBooga](https://github.com/etodanik/SvgBooga/tree/main)
- [Dear ImGui](https://github.com/ocornut/imgui)
- [Multi Theft Auto: San Andreas](https://github.com/multitheftauto/mtasa-blue)