mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 14:48:24 +00:00
lottie: ++exception handling
dropshadow opacity range seems 0 ~ 256. make it sure in 0 ~ 255.
This commit is contained in:
parent
9b43b93d1c
commit
29bf244265
1 changed files with 2 additions and 1 deletions
|
@ -1338,7 +1338,8 @@ void LottieBuilder::updateEffect(LottieLayer* layer, float frameNo)
|
|||
case LottieEffect::DropShadow: {
|
||||
auto effect = static_cast<LottieFxDropShadow*>(*ef);
|
||||
auto color = effect->color(frameNo);
|
||||
layer->scene->push(SceneEffect::DropShadow, color.rgb[0], color.rgb[1], color.rgb[2], (int)effect->opacity(frameNo), effect->angle(frameNo), effect->distance(frameNo), effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
|
||||
//seems the opacity range in dropshadow is 0 ~ 256
|
||||
layer->scene->push(SceneEffect::DropShadow, color.rgb[0], color.rgb[1], color.rgb[2], std::min(255, (int)effect->opacity(frameNo)), effect->angle(frameNo), effect->distance(frameNo), effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
|
||||
break;
|
||||
}
|
||||
case LottieEffect::GaussianBlur: {
|
||||
|
|
Loading…
Add table
Reference in a new issue