compositeMethod: introduced LumaMask 01/288801/1
authorMichal Maciola <m.maciola@samsung.com>
Thu, 30 Dec 2021 08:28:27 +0000 (09:28 +0100)
committerMichal Szczecinski <mihashco89@gmail.com>
Thu, 23 Feb 2023 08:18:27 +0000 (09:18 +0100)
commit07dfa5dc05a12605f7e60ac3870f8071a736465c
tree1ccd0c0672ee40699e994186ad0662237d6ce79b
parentada1526fedd9883dd999d9a4075043d80231882a
compositeMethod: introduced LumaMask

Introduced CompositeMethod::LumaMask that converts the source pixels to the
grayscale (luma value) before alpha blending. Thanks to it, mask works more like
typical mask in graphics editor software.
Grayscale is calculated with  weighted method:
(0.0721*B + 0.7154*G + 0.2125*R) * A
Introduced surface->blender.lumaValue function

Change-Id: Ia0258e2f374aa27acaef9b2f4161af5b04400422
inc/thorvg.h
src/lib/sw_engine/tvgSwCommon.h
src/lib/sw_engine/tvgSwRaster.cpp