* common: move iterator functionality into separate IteratorModule
* wasm: allow internal lib dependencies and iterator
* wasm: added functions for layers revising
This patch adds functions to thorvgwasm.cpp:
layers() - that return a list of paints in a picture
bounds() - that returns a bounds of a given paint
setOpacity() - that sets the opacity of a given paint
This patch adds the mimetype parameter for load() function and adds storing of
an original size after successful loading. Added function originalSize().
there was a wrong condition introduced the bug that image was not updated,
because transformation is not re-applied after the first created the internal image data.
@Issues: https://github.com/Samsung/thorvg/issues/751
Saver tries to pre-transfom to skip the matrix data,
but it missed the case - transformed stroking,
we skip it also only when xy scaling factors are same excluding the dash properties,
because scaled of the stroking is depent on the engines,
we have no idea of the proper input data in advance.
@Issues: https://github.com/Samsung/thorvg/issues/773
Since the arc flags can have values 0 or 1, we reported as
an error cases, when a float value was given.
Since the EBNF grammar can be used, we misread some paths.
Removing the condition that prevents giving a float as a flag solves
this problem and is in agreement with the w3 specs.
This reserved count was just missed,
Aside from it, tvg_loader logic is not well organized (hard to expect)
We can refine it by recovering the data tree structure in the reverse order.
@Issues: https://github.com/Samsung/thorvg/issues/768
Clips from outside the rendering region were ignored resulting
in rendering shapes, which should be completely clipped.
In case of the clip fast track, the bounding box width/height
overflow occured and shape, that should be clipped, could be
visible (not always).
The background color was misinterpreted and its value was treated
as an svg file name (warning was returned).
The color format can not be passed in a `#ffffff` format, since
the '#' sign is used in bash to comment a line and nothiing after
it is loaded.
there some multiple wrong calculation about size during tvg optimiation.
this patch fixes them.
1. picture needs to return the current desired size because
it will save the transformed the geometry. the final size should be
recorvered as the base size from the loader.
2. clippath missed to multiply parents transform, it's fixed.
@Issue: https://github.com/Samsung/thorvg/issues/752
Both functions implemented using 128-bit registers.
avxRasterTranslucentRect is around 5 times faster than cRasterTranslucentRect (i7-8700 CPU - Coffe Lake)