From 362b51028de6e3db530729283ee8f2023fb8b838 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 becbe662..573c5f6f 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; }