This reverts commit 74b27c74af.
This patch breaks Stroke example. 1 line drawings...
There is a possibility that less 1 (i.e: 0.5) width axis-aligned line drawings...
So logically "&&" is correct.
The alpha value calculation pulled out outside the inner loop
to reduce the number of unnecessary operations.
Added local variables to reduce the number of costly
multiplications performed in a loop.
This condition(optimization) is not a step suggested by arc implementation.
https://www.w3.org/TR/SVG11/implnote.html#ArcCorrectionOutOfRangeRadii (Step2)
This code is useful if the arc is too small to represent.
However, scaling often occurs in vectors, which can create unnecessary problems.
example path
<path d="M32.41,20.49a.41.41,0,1,1-.41-.42A.41.41,0,0,1,32.41,20.49Z" transform="translate(0)" fill="#020202"/>
There transformation logic was not identical between shape & gradient
gradient transform was applied into center of gradient world,
while shape wasn't. So... we correct gradient transform metric to shape like.
@Issues: 255
Scene could avoid composition if its children is only child (non scene)
This patch bring it conditionally check so as to avoid unnecesary expensive job.
@Issues: 254
* examples: Added resize_cb to Capi example.
resize_cb in capi example is used to verify crash on reize described
in @180 issue.
* examples capi: Fixed file type from dos to unix.
Use the same code style as it is used in other examples.
Description:
Crash was observed in examples when composite object was used.
It was caused because __m256i object was used on non aligned
memory to 32bit. Algorithm in this function was changed to use
unaligned __m256i_u object. Code was also simplified.
If a scene has another scene as a child and
the number of children is 1, the composition of the child does not work.
Therefore, fix that composition works as long as the number of children is not 0.
* sw_engine: adding a gradient as a stroke feature
Similarly as a shape may have a gradient fill so can the stroke.
* Capi: adding APIs for a gradient stroke
Co-authored-by: Hermet Park <hermetpark@gmail.com>
The rotation part of the transformation matrix can be assigned,
it does not have to be multiplied by the identity matrix.
The values of e13 and e23 of the transformation matrix represents the translation,
so they don't need to be taken into account in the rotation part.
Add a bot that checks the coding style using cpplint
and reports the result as a review comment.
This feature refers to the repository where cpplint
and docker settings with github-action.
This action works whenever a PR is created and updated.
In cpplint, only the violation of ThorVG's coding style is reported
as a warning using several options.
whitespace/parens
whitespace/indent
whitespace/end_of_line
whitespace/blank_line
The bot will review all of the contents of all files in the current commit file list,
However, in the future, we will improve Bot to only review the changes.