mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
lottie/parser: ++ blending options
thorvg blending is quite buggy, the feature needs a verification.
This commit is contained in:
parent
5401b1ae2e
commit
5129b05023
1 changed files with 19 additions and 1 deletions
|
@ -58,10 +58,28 @@ CompositeMethod LottieParser::getMaskMethod(bool inversed)
|
|||
BlendMethod LottieParser::getBlendMethod()
|
||||
{
|
||||
switch (getInt()) {
|
||||
case 0: return BlendMethod::Normal;
|
||||
case 1: return BlendMethod::Multiply;
|
||||
case 2: return BlendMethod::Screen;
|
||||
case 3: return BlendMethod::Overlay;
|
||||
default: return BlendMethod::Normal;
|
||||
case 4: return BlendMethod::Darken;
|
||||
case 5: return BlendMethod::Lighten;
|
||||
case 6: return BlendMethod::ColorDodge;
|
||||
case 7: return BlendMethod::ColorBurn;
|
||||
case 8: return BlendMethod::HardLight;
|
||||
case 9: return BlendMethod::SoftLight;
|
||||
case 10: return BlendMethod::Difference;
|
||||
case 11: return BlendMethod::Exclusion;
|
||||
//case 12: return BlendMethod::Hue:
|
||||
//case 13: return BlendMethod::Saturation:
|
||||
//case 14: return BlendMethod::Color:
|
||||
//case 15: return BlendMethod::Luminosity:
|
||||
case 16: return BlendMethod::Add;
|
||||
//case 17: return BlendMethod::HardMix:
|
||||
default: {
|
||||
TVGERR("LOTTIE", "Non-Supported Blend Mode");
|
||||
return BlendMethod::Normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue