lottie: adjusted the effect distance

This commit is contained in:
Hermet Park 2025-07-07 16:28:20 +09:00 committed by Mira Grudzinska
parent 2ea09f0edb
commit 68f3e54cec
2 changed files with 2 additions and 2 deletions

View file

@ -1426,7 +1426,7 @@ void LottieBuilder::updateEffect(LottieLayer* layer, float frameNo)
auto effect = static_cast<LottieFxDropShadow*>(*ef);
auto color = effect->color(frameNo);
//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)), (double)effect->angle(frameNo), (double)effect->distance(frameNo), (double)effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
layer->scene->push(SceneEffect::DropShadow, color.rgb[0], color.rgb[1], color.rgb[2], std::min(255, (int)effect->opacity(frameNo)), (double)effect->angle(frameNo), (double)effect->distance(frameNo) * 0.5f, (double)effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
break;
}
case LottieEffect::GaussianBlur: {

View file

@ -1298,7 +1298,7 @@ void LottieParser::parseEffect(LottieEffect* effect, void(LottieParser::*func)(L
else skip(key);
}
++idx;
} else skip();
} else (this->*func)(effect, idx++);
} else skip();
}
}