1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef LOTTIEREPEATERTRANSFORM_P_H
5#define LOTTIEREPEATERTRANSFORM_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtLottie/private/qlottiebasictransform_p.h>
19
20QT_BEGIN_NAMESPACE
21
22class QJsonObject;
23
24class Q_LOTTIE_EXPORT QLottieRepeaterTransform : public QLottieBasicTransform
25{
26public:
27 QLottieRepeaterTransform() = default;
28 explicit QLottieRepeaterTransform(const QLottieRepeaterTransform &other);
29 QLottieRepeaterTransform(const QJsonObject &definition,
30 QLottieBase *parent);
31
32 QLottieBase *clone() const override;
33
34 void construct(const QJsonObject &definition);
35
36 void updateProperties(int frame) override;
37 void render(QLottieRenderer &renderer) const override;
38
39 qreal startOpacity() const;
40 qreal endOpacity() const;
41
42 void setInstanceCount(int copies);
43 qreal opacityAtInstance(int instance) const;
44
45protected:
46 int m_copies = 0;
47 QLottieProperty<qreal> m_startOpacity;
48 QLottieProperty<qreal> m_endOpacity;
49 QList<qreal> m_opacities;
50};
51
52QT_END_NAMESPACE
53
54#endif // LottieREPEATERTRANSFORM_P_H
55

source code of qtlottie/src/lottie/qlottierepeatertransform_p.h