FileType order was changed in tvgLoaderMgr.h to move Tvg at the beginning.
When raw data loading [LoaderMgr::loader(data, size)], loaders are tried
one by one (in order according to the FileType enum) until the correct loader
is found.
When using EFL and load edj, multiple loader(data, size) with tvg data may be
called. This change should improve performance in that case.
This patch introduces tvg loader module for loading .tvg binary files.
This allows to load and reuse pregenerated scene.
tvg file format:
.tvg is a binary file format designed for saving/restoring the scene content.
It allows to save scenes and reuse them in other apps or to restore state of
the application.
@Example:
auto picture = tvg::Picture::gen();
picture->load(EXAMPLE_DIR"/tvg_file.tvg");
canvas->push(move(picture));
@API Additions:
Result paint(std::unique_ptr<Paint> paint) noexcept;
@Issue: Issue ticket is #375.
The loader was ready to handle the gradient stroke, but there was no API to support
it when the loader was introduced. We've had this API for a while already, so
its call has been added.
When canvas width was smaller than its stride and a composition is used,
the plots were drawn incorrectly. This is fixed by setting the image width
(image from a compositor) to be equal to the surface stride, instead of its width.
The image data are now allocated accordingly the fixed image width.
We are doing enough calculations in the parser if the unit is user space.
This causes the cx,cy coordinates of radial gradient to be calculated incorrectly.
So remove it.
Calculation of objectBoundingBox case in linear gradient is incorrect code.
This causes the x,y coordinates of the linear gradient to be calculated incorrectly.
So remove it.
This patch introduces tvgTvgHelper.h file that contains base definitions used
for .tvg loader and saver modules. Indicators, flags and sizes are defined
and base tvgBlock struct is declared here.
'tvgTvgHelper.h' file is essential only for .tvg loader/saver module and it
doesn't affect any other file. Loader and saver modules itself are introduced
in other, further patches.
.tvg is a binary file format designed for saving/restoring the scene content.
It allows to save scenes and reuse them in other apps or to restore state of
the application.
The 'loader->svgParse->global' variable was uninitialized when no viewBox attribute
was set. If gradient was applied, the division by zero occured and no gradient was drawn.