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.
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
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.
When shapes are poped from canvas while retaining shapes instances,
they have no chances to redraw after pushed again due to missing flag.
This patch fixes it by forcely updating flag on pushing time.
@Issues: 181
added a routine that draw non-transformed translucent image.
composition images will use this routine to draw faster.
Also added optimization point comments in raster image.
remove the opacity argument in the render method.
Considered again, this opacity value is not commonly used yet.
we can introduce it when it's necessary.
Renamed internal interfaces.
We need both blender & compositor interfaces.
Renamed SwCompositor -> SwBlender which is for pixel joining methods.
Added (SwCompositor, Compositor) which is designed for compositing images.
Splited out ClipPath routine from other pixel compositions'
since yet it's unlikely compatible...
Also revise internal engine interfaces to be simpler.
This is a step forward to enhance masking feature.