mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 14:48:24 +00:00
lottie: adjusted the effect distance
This commit is contained in:
parent
2ea09f0edb
commit
68f3e54cec
2 changed files with 2 additions and 2 deletions
|
@ -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: {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue