In a case where both the clipper and the clippee
are transformed, the final clipper transformation
matrix should be calculated as the multiplication
of both matrices.
@Issue: https://github.com/thorvg/thorvg/issues/1255
The new api is introduced to handle the rendering
order of a stroke and a fill. By default fill is
rendered as the first one, stroke as the second
one. This order can be reversed by calling
order(true).
@Issue: https://github.com/thorvg/thorvg/issues/1340
If no viewbox is given, vx and vy were set to values
corresponding to the svg's bounding box. This is now
applied only if no viewbox and no width/height information
is given. Otherwise, vx and vy are set to the default
values (0, 0).
@Issue: https://github.com/thorvg/thorvg/issues/1368
Self-closing tags (empty elements) were parsed until
the appearance of the '>' character, causing the '/'
char to be appended to the tag name. The final '/'
char should be omitted.
Introduced SceneTask, it implements scene clippath behavior
by merging RLE of the scene children render data on any running thread.
Co-authored-by: Michal Szczecinski <m.szczecinsk@partner.samsung.com>
@Issue: https://github.com/thorvg/thorvg/issues/524
As there are multiple types of painting tasks,
the clip() interface has been newly designed to handle clipping behavior
according to each task's role when requested."
Now Scene clipper could implement clipping behavior on it.
Till now only the grad stops were inherited. Now all
grad attribs are.
Inheritance from different grad type is not supported.
@Issue: https://github.com/thorvg/thorvg/issues/1209
Logging tags are marked with the corresponding
log type color, the file and the line information
in gray, and the message content in the default
color.
@Issue: https://github.com/thorvg/thorvg/issues/1351
Revise the logic to avoid potential blocking of the main thread.
Move the clippers job completion to worker-threads to prevent main thread blocks
and enhance maximum parallelization efficiency.
We have an incorrect value comparison when the stroke corner center
is adjusted. All coordinates in the stroke raster have been scaled by
the given values (sx, sy), while the stroke width remains at its
original size due to it not being clear how it should be scaled.
This brings wierd rendering results at times. Now fix it.
@Issue: https://github.com/thorvg/thorvg/issues/1336
Svgs without any viewbox and width/height information
have to be loaded before any other action is taken.
This is necessary to get the valid sive/viewbox info.
When reload is called from tvgPicture,
clear() of external_jpg loader is called and 'data' is freed.
In the past, there was no case where reload was called until bitmap() was called after load.
Currently I have to consider reload() for a none-viewbox svg case
So change the color myself because loader can't call open() again.
In case the "stroke" attrib is set to "none",
the width of the stroke is set to zero. Thanks
to that it isn't taken into account while
establishing the bounds of the shape.
For svgs with the width and/or height value set to zero
rendering was disabled - the load api return Result:Unknown
and draw - Result::InsufficientCondition.
Now an empty scene is added, so that both, load and draw,
return Result::Success.
Set colorspace to ABGR when colortype of lodepng is LCT_RGBA.
Since an image without an alpha channel becomes an ARGB colorspace with LCT_RGB,
it is the same as the default colorspace.
Since the color space is set at the time of specifying the target buffer of the canvas,
there is no way to know the color space when the picture is loaded.
So, check the color space applied to SwCanvas at the time of reload()
and change the color space.
There is an issue of BGR color space support for each loader.
The external_jpg loader resets the TJPF color space and calls read() to get a new buffer.
In the case of external_png, we need to change the color value directly
because it have to start over from begin_read_*.
This solution can affect performance as much as it access again image buffer
that have already been `read()` done. However, this only happens once.