Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sammycage/plutosvg
Tiny SVG rendering library in C
https://github.com/sammycage/plutosvg
c emoji2png freetype otfsvg plutovg svg svg-hooks svg2png
Last synced: about 2 months ago
JSON representation
Tiny SVG rendering library in C
- Host: GitHub
- URL: https://github.com/sammycage/plutosvg
- Owner: sammycage
- License: mit
- Created: 2020-09-26T10:32:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T06:19:06.000Z (about 2 months ago)
- Last Synced: 2024-11-06T07:22:03.782Z (about 2 months ago)
- Topics: c, emoji2png, freetype, otfsvg, plutovg, svg, svg-hooks, svg2png
- Language: C
- Homepage:
- Size: 290 KB
- Stars: 259
- Watchers: 11
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PlutoSVG
plutosvg is a tiny SVG rendering library in C## Features
- Basic Shapes : rect, circle, ellipse, line, polyline, polygon, path
- Paint Servers : solidColor, linearGradient, radialGradient, pattern(TODO)
- Document Structures: defs, svg, g, use, symbol
- Texts (TODO) : text, tspan, tref
- Image (TODO)## Example
```c
#include#include
#includeint main(void)
{
plutovg_surface_t* surface = plutosvg_load_from_file("camera.svg", NULL, 0, 0, 96.0);
if(surface == NULL)
{
printf("Load failed\n");
return -1;
}plutovg_surface_write_to_png(surface, "camera.png");
plutovg_surface_destroy(surface);
return 0;
}```
output :
![camera.png](camera.png)
## Build
Install [cmake](https://cmake.org/download/) if not already installed```
git clone --recursive https://github.com/sammycage/plutosvg.git
cd plutosvg
mkdir build
cd build
cmake ..
make
```## Support
If you like what we do, [you can buy us a coffee](https://www.buymeacoffee.com/sammycage)