mirror of https://github.com/procxx/kepka.git
QtLottie: Bug fixes.
This commit is contained in:
parent
9b7e3dc3ec
commit
48eb5dd112
|
@ -1 +1 @@
|
||||||
Subproject commit 1d23bd35d1e540d7c1aaf7ff88db22d914f4947c
|
Subproject commit 5213d12d619e3a37fb912153990ceb1e49e0adc6
|
|
@ -431,11 +431,15 @@ public:
|
||||||
if (!this->m_animated)
|
if (!this->m_animated)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int adjustedFrame = qBound(this->m_startFrame, frame, this->m_endFrame);
|
int adjustedFrame = qBound(this->m_startFrame, frame, this->m_endFrame);
|
||||||
if (const EasingSegment<T> *easing = BMProperty<T>::getEasingSegment(adjustedFrame)) {
|
if (const EasingSegment<T> *easing = BMProperty<T>::getEasingSegment(adjustedFrame)) {
|
||||||
qreal progress = ((adjustedFrame - this->m_startFrame) * 1.0) /
|
qreal progress;
|
||||||
(this->m_endFrame - this->m_startFrame);
|
if (easing->endFrame == easing->startFrame)
|
||||||
qreal easedValue = easing->easing.valueForProgress(progress);
|
progress = 1;
|
||||||
|
else
|
||||||
|
progress = ((adjustedFrame - easing->startFrame) * 1.0) /
|
||||||
|
(easing->endFrame - easing->startFrame);
|
||||||
|
qreal easedValue = easing->easing.valueForProgress(progress);
|
||||||
// For the time being, 4D vectors are used only for colors, and
|
// For the time being, 4D vectors are used only for colors, and
|
||||||
// the value must be restricted to between [0, 1]
|
// the value must be restricted to between [0, 1]
|
||||||
easedValue = qBound(qreal(0.0), easedValue, qreal(1.0));
|
easedValue = qBound(qreal(0.0), easedValue, qreal(1.0));
|
||||||
|
|
Loading…
Reference in New Issue