The values of the most bottom right corner of the scene bounding box
should be initialized with the biggest negative values.
Also an empty line removed.
The translucent rastering function is split into 3 other (instead of if/else statement).
An additional function is introduced to decide which one of the 3 should be called.
This refactoring is done to preserve the convention used for all other rastering functs.
The translucent rastering function is split into 3 other (instead of if/else statement).
An additional function is introduced to decide which one of the 3 should be called.
This refactoring is done to preserve the convention used for all other rastering functs.
The translucent rastering function is split into 3 other (instead of if/else statement).
An additional function is introduced to decide which one of the 3 should be called.
This refactoring is done to preserve the convention used for all other rastering functs.
The translucent rastering function is split into 3 other (instead of if/else statement).
An additional function is introduced to decide which one of the 3 should be called.
This refactoring is done to preserve the convention used for all other rastering functs.
The cases with gradient shapes with composition are handled
in the same function as gradint shapes with opacity < 255.
Parts of the code from _rasterOpaque... grad functions moved to
_rasterTranslucent... grad functions.
The cases when composition was applied were handled only for AlphaMask and
InvAlphaMask. When opacity value was to be < 255, there was no code
to handle this.
- Change tag name "Doc" to "Svg"
- Fix "Mask" tag name.
- Add element to skip output
- title
- Add attribute to skip output
- id, data-name, version, overflow=visible, xmlns*, xml:space
We have encountered that multi-threading usage that user creates,
multiple canvases owned by multiple user threads.
Current sw_engine memory pool has been considered only for multi-threads,
spawned by tvg task scheduler.
In this case it's safe but when user threads introduced, it can occur race-condition.
Thus, Here is a renewal policy that non-threading tvg(initialized threads with zero),
takes care of multiple user threads bu changing its policy,
each of canvases should have individual memory pool to guarantee mutual-exclusion.
@API additions
enum MempoolPolicy
{
Default = 0, ///< Default behavior that ThorVG is designed to.
Shareable, ///< Memory Pool is shared among the SwCanvases.
Individual ///< Allocate designated memory pool that is only used by current instance.
};
Result SwCanvas::mempool(MempoolPolicy policy) noexcept;
All in all, if user calls multiple threads, set memory pool policy to Individual.
TVG_RESULT_INVALID_ARGUMENT returned in case a nullptr passed as an argument
(does not apply to color getters).
The change is addressed in the docs file.
The buffer to which the mask is rastered is only partially cleared.
If the object to which the mask is applied overlaps an area where
another mask was used, an erroneous image is generated. The buffer
clearing area has been increased to the size of the object to which
the mask is applied.
1.
Modify that attribute information used for use type
looks like it was used for g type.
2.
Fix clippath node looking like setting "none"
(clippath's display = false is intentional)
strtof's behavior is changed by system locale.
https://linux.die.net/man/3/strtof
Because of this, strtof(10.0000) returns 0.0 in some locales.
When a given value string is locale-independent, strtof has to be
replaced to custom function.
If no viewBox attribute is given, the height and width attributes are used
to establish the viewBox size. However, this information was not available
inside the scene builder, even though it was needed.
The picture->size() function does not work for raw/png pictures.
As a consequence enabling both, the svg and png file loaders,
resulted in the unintended behavior of the example.
not only clippath but alpha compositions might also have any valid color.
Set it default and let it override values while appending shapes if it's necessary.
Current loader could return invalid shapes -default, from _appendShape()-
by a certain interpretation result,
Though it's a wrong or exception case, we can prevent worse case by avoiding it.
In the fillFetchLinear function the offset parameter was removed.
The destination address may be shifted directly in the dst parameter,
it doesn't need to be passed separately.
previously alpha multiplying operation doesn't have perfect precision,
could loss 1 pixel since it divides 255 values by 256.
This improved operation comply with both precision & performance.