mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
lottie: fix viewport clipping issue when resize
After resizing an animation, the base clipper for the viewport of the root scene did not update accordingly. This caused the animation to always be clipped by its initial size. Additionally, this issue introduced a regression in v1 when the `Result Picture::size(float w, float h)` function was called. issue: https://github.com/thorvg/thorvg/issues/3039
This commit is contained in:
parent
82dc41479e
commit
38a4465656
1 changed files with 2 additions and 3 deletions
|
@ -260,9 +260,8 @@ bool LottieLoader::resize(Paint* paint, float w, float h)
|
|||
paint->transform(m);
|
||||
|
||||
//apply the scale to the base clipper
|
||||
const Paint* clipper;
|
||||
paint->mask(&clipper);
|
||||
if (clipper) const_cast<Paint*>(clipper)->transform(m);
|
||||
auto clipper = PAINT(paint)->clipper;
|
||||
if (clipper) clipper->transform(m);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue