lottiemodel: Improve opacity calculation for gradient stop 04/267704/1 accepted/tizen/6.5/unified/20211216.155657 submit/tizen_6.5/20211215.043506
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 9 Dec 2021 00:50:46 +0000 (09:50 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 9 Dec 2021 04:16:05 +0000 (13:16 +0900)
commitc22c860428f3ff9d48e5e6c6538f59cb7ce98e07
treeaad9e3a7cc38b5eb276c5ef8abca3ae9b63e1a0c
parent032228a66971172e6a1434938d6cd0c77edf418a
lottiemodel: Improve opacity calculation for gradient stop

Basically, Graeidnt stop's color and opacity are provided as separate arrays.
Stop position and opacity position do not match each other.
Existing code is a sequential approach. It caused problems in various cases of positions.
The improved logic repeats the loop, but no exceptions are raised. It's not complicated, it's simple.

This code referenced the lottie-android library.
https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java

Change-Id: Ie4e45b04dd8ef4d951d8177cb204b612760e6bda
src/lottie/lottiemodel.cpp
src/lottie/lottiemodel.h