Changes:
- Added 'neon' vector option in build system
- Introduced neon version of rasterRGBA32 API, which improves
speed of the funciton on ARM cpu's around ~35%
This is an utility to convert a file from svg to tvg
To use this, enable the feature by toggling in the meson option.
$meson build -Dtools="svg2tvg" ...
See also the usage:
Usage:
svg2tvg [SVG file]
Examples:
$ svg2tvg input.svg
tvg saver is a new module to export tvg files.
In this patch, it also contains the infrastructure of saver module
to expand other types of savers such as png, jpg, etc.
To save the tvg file from a paint, you can use the Saver feature, for example:
auto saver = tvg::Saver::gen();
saver->save(paint, "sample.tvg");
saver->sync();
Later, you can read the "sample.tvg" using Picture.
auto picture = tvg::Picture::gen();
picture->load("sample.tvg");
...
The behavior of the saver will work on sync/async based on the threading setting of the initializer.
Thus if you wish to have a benefit of it, you must call sync() after the save() in the proper delayed time.
Otherwise, you can call sync() immediately.
Note that, the asynchronous tasking is depent on the saver module implementation.
Also, you need to enable tvg saver/loader modules from meson option. (yet this feature is under the beta)
@API Addition:
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path) noexcept;
Result Saver::sync() noexcept;
@Examples: tvgSaver
@Co-author: Mira Grudzinska <m.grudzinska@samsung.com>
This patch introduces a jpg loader.
For decoding the image, libjpeg-turbo library is used. Library was found to be
fast (SIMD instructions accelerated) and portable.
@issue: #517
Catch2 is a multi-paradigm test framework for C++.
It is primarily distributed as a single header file,
very easy and simple to adopt this to thorvg project.
This patch introduces catch2 infrastsructure and one prototype as a sample.
You can refer "testInitializer.cpp", how to add unit test!
while ignoring else files such as "catch2.hpp", "testMain.cpp"
Also, enable Unit-tests with meson option when you change any thorvg code.
$meson build -Dtests=true.
launch tvgUnitTest in the build result then verify 100% coverage
before submitting any patches.
tests is now officially placed in src/examples,
default is turned off, only necessaries turn it on.
ex) meson . build -Dexamples=true
+ this examples are required efl 'elementary' package.
* thorVG/example: added thorVG example app to convert svg to png
Rasterazing the svg file and extracting it as a png file.
The png encoder uses the 'lodepng' library.
(https://lodev.org/lodepng/)
Usage:
svg2png [svgFileName] [Resolution] [bgColor]
Examples:
$ svg2png input.svg
$ svg2png input.svg 200x200
$ svg2png input.svg 200x200 ff00ff
* ThorVG/Utils: Change examples to utils
* ThorVG/Utils: Move svg2png from util to src/bin
Renamed the build option for svg2png.
We don't include gl compile before it works properly.
For development & test please turn it on in meson_option.txt locally.
Change-Id: I2ff8b06f8e1b496922f70ec580662e8886a9b93d
avx is the cutting edge method for intel & amd cpus simd instruction.
We are going to support this feature for the desktop environment (instead of sse)
You can turn on this with configuration something like this:
$meson . build -Dvectors=avx
Current patch supports only for raster solid color
Change-Id: I068ba30a1f63d480415e2762f8021fc8d6d28a39