WARNING:: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
The CompositeMethod now includes the newly supported InvLumaMask option:
The source pixels are converted to grayscale (luma values),
and the complement of the target's pixels is alpha blended.
As a result, only the part of the source where the grayscale
is not covered by the target is visible.
@APIs: CompositeMethod::InvLumaMask
@Example: examples/InvLumaMasking.cpp
@Issue: https://github.com/thorvg/thorvg/issues/404
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
The cast() method is a utility function used to
cast a 'Paint/Fill' to type 'T'.
This would help users to write code optimal.
@API Additions:
template<typename T> std::unique_ptr<T> cast(Paint* paint)
template<typename T> std::unique_ptr<T> cast(Fill* fill)
Remove extern "C specifier. ThorVG has the C binding,
C++ apis doesn't need to be compatibile with a C compiler.
This limits the C++ style template interface.
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