The _appendArc function allows to draw angles only in a clockwise direction.
The introduced improvement allows to change this direction by giving the 'sweep' argument
with a negative value.
The wasm is using the ThorVG output starting whith "SVG:" to show
unsupported element and attribute of svg file.
This patch updates wasm_build.sh to make ThorVG prints log,
and removes build errors.
- Following commit needs to include 'algorithm'
1ed6113 common sw_engine: code refactoring & stabilizing.
- Following commit needs to include 'string'
5481633 svg_loader XmlParser: Print unsupported elements, ...
Introduce RendererMethod::renderRegion() to return acutal drawing region info.
That is used by scene composition to composite actual partial drawing region
for better performance.
@Issues: 173
Apply tvg Array instead of std::vector
Also Fixed to compList in update() to passed by reference, not copying.
Also Fixed Composition Target memory leak
Here is the binary size result:
[libthorvg.so] 1785376 >> 1607416
[text] 121255 >> 118277
[data] 7792 >> 7736
[dec] 129119 >> 126085
This Array is promoted from SvgVector to use it widely in tvg.
It's similar with std::vector, we can use it instead of it.
Also, svg_loader replaced with it subsequently.
this is an additional enhancement of af8c278c5e
Now scene opacity composition is supported.
Also, this implementaion fixes an incorrect scene bounding box computation.
Plus, adding stroking feathering to shape bounding box size.
* common Picture : Introduce Picture's size setter, getter APIs
If picture or file loaded by picture has an explicit Size(width, height),
it is transformed to fit the size.
Move the prepare stage of shape & stroking composition stage to a separate function
this returns SwImage to use in composite stage.
Also clear partial region buffer since we know composition area.
Existing parser functions always return true.
Parser function's return value was not being properly used.
So, add a return to check whether it is parsed or not.
There is 1 pixel misaligned issue observed.
Found out transform() increases 0.5 pt always.
This transform() logic was broken by this change - e00f948705
and now recorvered to origin.
This implementation supports shape + stroke opacity composition.
Currently, tvg shape provides individual alpha values for filling & stroking
These alpha values are working individually, meaning that if stroking is half translucent,
user can see that translucent stroking is crossed the shape outlines.
Sometimes this result can be expected but user also expects the shape filling is invisible
behind of translucent stroking.
For this reason, Paint provides an additional api opacity()
that applies opacity value to whole paint attributes.
This is a little expensive job, please consider if you can possibly avoid that usage.
See Opacity example.
@Issues: 94