Handle correctly duplicated spans from the multiple y span data.
Previous logic only expected the one single y span data from the rle.
However rle might have multiple y span data if the anti-aliasing is applied.
This patch also removed the bad design of the common engine
which handles the anti-alising option to ignore the anti-aliasing rle generation.
Just realized, it's difficult to control that condition due to scene-composition.
strokeOutline returned strokeExportOutline() is the address of mpool->strokeOutline[idx].
Assuming this value is null, mpoolRetStrokeOutline on line 617 will access mpool->strokeOutline[idx].
Logically, the logic of the mpool* functions does not occur in this case.
replace the transformed rle rgba image with the texmap raster.
this patch removes the several scattered transformed image rasterizer,
reuse the unified one texmap method instead.
yay, it's much clean and optimal.
Migrate the id property to the base class internals
so that pimpl classes could access the data easier.
This is a sort of prerequisite change for the coming texmap anti-aliasing.
Previously, translucent png images are not displayed properly
due to alpha channels premultiplication.
This patch implements that missing part to support it properly
by introducing the Surface data between canvas engine & rasterizer
@Issue: https://github.com/Samsung/thorvg/issues/655
The x and y of spans cannot be negative
because they are specified as coordinates inside the buffer.
Change the type to fix warnings and potential problems
that occur in conversion between int16_t and uint32_t.
To handle the objectBoundingBox units, the shape's boundaries have to be known.
According to the SVG standard, a stroke shouldn't be taken into account. Since
the bounds() api uses the shape's stroke information, a new function is introduced,
that compensates this and returns boundaries without any strokes.
Introduced the texture-mapping algorithm for the image-scaler.
With this approach, we can support any arbitrary forms of the transformed shapes
while appling the scale factors - x/y separately.
Also this is more efficient when the transformed image is far from the rectangular form
because our current normal image rasterizer based on the given drawing region whereas
our new approach is span-based.
Thus, we applied this mechanism only for the transformed images.
The problem was observed for empty masked scenes (except the fastTrack
cases). Solved by imimediate returning from the func without passing 'false'
as its result.
There was a missing sorting between the left-top & right-bottom corner.
that results in the negative values of the viewport...
Now fixed it.
+ refactored to use math functions...
+ still it's a buggy, sometimes no draw at 90' in stress. don't know reason. :(
When parsing a binary stored as a char type,
interpreter can access the misaligned memory while accessing it with a pointer.
To prevent that, pass the array copied to memcpy as tvg Object.