From bd5728a140d6186a16dc90a284466767366c2c98 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Wed, 28 Aug 2024 15:49:55 +0200 Subject: [PATCH] lottie: fix trim path regression To avoid editing the trim path values provided by the user, the logic for their interpretation was moved from the API to the renderer (7c87d8e). This caused an issue in the lottie animations when the trim path is applied more than once. Now fixed. @issue: https://github.com/thorvg/thorvg/issues/2670 --- src/loaders/lottie/tvgLottieModel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/loaders/lottie/tvgLottieModel.cpp b/src/loaders/lottie/tvgLottieModel.cpp index 0a05fb4f..2eb0620b 100644 --- a/src/loaders/lottie/tvgLottieModel.cpp +++ b/src/loaders/lottie/tvgLottieModel.cpp @@ -157,6 +157,7 @@ void LottieTrimpath::segment(float frameNo, float& start, float& end, LottieExpr return; } + if (start > end) std::swap(start, end); start += o; end += o; }