32 const QVariant ¤t,
35 QColor color = current.value<QColor>();
37 qreal fromAlpha = from.alphaF();
38 qreal toAlpha = to.alphaF();
40 color.setAlphaF(fromAlpha + (toAlpha - fromAlpha) * progress);
41 return QVariant::fromValue(color);
54QQuickColorOpacityAnimation::QQuickColorOpacityAnimation(QObject *parent)
55 : QQuickPropertyAnimation(parent)
57 Q_D(QQuickPropertyAnimation);
58 d->defaultToInterpolatorType =
true;
59 d->interpolatorType = QMetaType::QColor;
60 d->extendedInterpolator =
reinterpret_cast<QQuickPropertyAnimationPrivate::ExtendedInterpolator>(
reinterpret_cast<
void(*)()>(opacityInterpolator));
static QT_BEGIN_NAMESPACE QVariant opacityInterpolator(const QColor &from, const QColor &to, const QVariant ¤t, qreal progress)
\qmlmodule QtQuick.VectorImage.Helpers \title Qt Quick Vector Image Helpers QML Types