| 1 | // Copyright (C) 2018 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef BMFILL_P_H |
| 5 | #define BMFILL_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 <QColor> |
| 19 | #include <QVector4D> |
| 20 | |
| 21 | #include <QtBodymovin/private/bmgroup_p.h> |
| 22 | #include <QtBodymovin/private/bmproperty_p.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | class BODYMOVIN_EXPORT BMFill : public BMShape |
| 27 | { |
| 28 | public: |
| 29 | BMFill() = default; |
| 30 | explicit BMFill(const BMFill &other); |
| 31 | BMFill(const QJsonObject &definition, const QVersionNumber &version, BMBase *parent = nullptr); |
| 32 | |
| 33 | BMBase *clone() const override; |
| 34 | |
| 35 | void updateProperties(int frame) override; |
| 36 | |
| 37 | void render(LottieRenderer &renderer) const override; |
| 38 | |
| 39 | QColor color() const; |
| 40 | qreal opacity() const; |
| 41 | |
| 42 | protected: |
| 43 | BMProperty4D<QVector4D> m_color; |
| 44 | BMProperty<qreal> m_opacity; |
| 45 | }; |
| 46 | |
| 47 | QT_END_NAMESPACE |
| 48 | |
| 49 | #endif // BMFILL_P_H |
| 50 | |