There are two branches for completing stroke composition between the canvas and sw_engine.
It is necessary to centralize the task on the canvas engine side so that
we can maintain the logic without confusion.
When combining Shape, Stroke, and AlphaMasking, there is a missing
composition step which results in an incorrect output as expected by the user.
This problem is resolved by introducing shape fill and stroking composition.
@Issue: https://github.com/thorvg/thorvg/issues/209
Previously, a picture with a half-translucent mask would not function correctly.
This fix addresses the bug by applying the expected composition step.
Note: Even after applying this patch, a half-translucent mask with shape fill alpha will still not work properly.
We should consider removing the fill alpha property, as it duplicates the Paint opacity.
@Issue: https://github.com/thorvg/thorvg/issues/1423
In the current implementation, only a scene with a single shape type
is able to skip the composition step. However, a child picture might
have multiple children shapes as well, which leads to the bug.
Rule of thumb on Windows:
* for a DLL:
* if the library is built, set TVG_API to __declspec(dllexport)
* if the library is used, set TVG_API to __declspec(dllimport)
* for a static library, set TVG_API to nothing
To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built.
Otherwise, TVG_API is correctly set for a DLL.
Also sun and intel compilers are handled
@issue: https://github.com/thorvg/thorvg/issues/1446
In the case when a 'use' node was used
in a 'defs' block and the element it
referenced was also defined within the same
'defs' block, the reference node could not
be cloned. This was because the 'defs' node
could not be located.
@Issue: https://github.com/thorvg/thorvg/issues/1451
Similar shapes are merged to improve
performance. This should not be the case
with a semi-transparent fill, different
shapes' fill-rule or fill-rule set to evenodd.
@Issue: https://github.com/thorvg/thorvg/issues/1440
In the event that malloc returns a nullptr while copying
loaded raw data, a Result::NonSupport value is returned.
However, it appears that Result::FailedAllocation would be
more accurate.
The svg width/height values were cast to int,
which could result in cutting off a small part
of the image. Now, in the case of a non-integer
size, it will be rounded up.
@Issue: https://github.com/thorvg/thorvg/issues/1414
There is a report of the thread sanitizer.
It could be a false-positive as far as I reviewed,
but we hate to be bothered by it. So let's revert it.
@Issue: https://github.com/thorvg/thorvg/issues/1409
The conversion to percentages was applied twice.
Additionally, when a viewbox value was provided before the width/height,
incorrect scaling occurred.
@Issue: https://github.com/thorvg/thorvg/issues/1414
The percentages should refer to the size of the viewbox.
This was not the case for not knowing the viewbox before
reading the width/height.
@Issue: https://github.com/thorvg/thorvg/issues/1409
One more regression bug by afea40a947
As tasks will now be triggered by other tasks on the worker threads,
the designated memory pool data (outline) for each thread should be
reset before moving on to other tasks.
@Issue: https://github.com/thorvg/thorvg/issues/1409