From 5129b05023face6f0e79d08a94c4f54dafa764f4 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 13 Nov 2023 12:25:35 +0900 Subject: [PATCH] lottie/parser: ++ blending options thorvg blending is quite buggy, the feature needs a verification. --- src/loaders/lottie/tvgLottieParser.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/loaders/lottie/tvgLottieParser.cpp b/src/loaders/lottie/tvgLottieParser.cpp index d7931015..6aa42731 100644 --- a/src/loaders/lottie/tvgLottieParser.cpp +++ b/src/loaders/lottie/tvgLottieParser.cpp @@ -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; + } } }