mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
ReadMe: Add description for svg2png (#62)
This commit is contained in:
parent
7e30c217b0
commit
2772397486
1 changed files with 25 additions and 2 deletions
27
README.md
27
README.md
|
@ -149,8 +149,31 @@ Lastly, terminate the engine after usage.
|
||||||
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
```
|
```
|
||||||
[Back to contents](#contents)
|
[Back to contents](#contents)
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
## SVG to PNG
|
||||||
|
If you want to preview ThorVG renderer's SVG output, you can use `svg2png` converter which can be used to convert SVG file to PNG file.
|
||||||
|
|
||||||
|
To build `svg2png`, you need to change the build option.
|
||||||
|
```
|
||||||
|
meson -Dutility=svg2png . build
|
||||||
|
```
|
||||||
|
Or you can add `svg2png` value to `utility` option in `meson_option.txt`. Build output is located in `builddir/src/bin/svg2png/`
|
||||||
|
|
||||||
|
`svg2png` creates `FILENAME.svg.png` by entering path of svg file, resolution, and background color.
|
||||||
|
```
|
||||||
|
Usage:
|
||||||
|
svg2png [svgFileName] [Resolution] [bgColor]
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
$ svg2png input.svg
|
||||||
|
$ svg2png input.svg 200x200
|
||||||
|
$ svg2png input.svg 200x200 ff00ff
|
||||||
|
```
|
||||||
|
|
||||||
|
[Back to contents](#contents)
|
||||||
|
|
||||||
|
|
||||||
## API Bindings
|
## API Bindings
|
||||||
Our main development APIs are written in C++ but ThorVG also provides API bindings such as: C.
|
Our main development APIs are written in C++ but ThorVG also provides API bindings such as: C.
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Add table
Reference in a new issue