1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QLOTTIERECT_P_H
5#define QLOTTIERECT_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 <QRect>
19#include <QPointF>
20#include <QBrush>
21#include <QPen>
22
23#include <QtLottie/private/qlottieshape_p.h>
24#include <QtLottie/private/qlottieproperty_p.h>
25#include <QtLottie/private/qlottiespatialproperty_p.h>
26#include <QtLottie/private/qlottiefill_p.h>
27#include <QtLottie/private/qlottiestroke_p.h>
28
29QT_BEGIN_NAMESPACE
30
31class Q_LOTTIE_EXPORT QLottieRect : public QLottieShape
32{
33public:
34 QLottieRect() = default;
35 explicit QLottieRect(const QLottieRect &other);
36 QLottieRect(const QJsonObject &definition, QLottieBase *parent = nullptr);
37
38 QLottieBase *clone() const override;
39
40 void construct(const QJsonObject &definition);
41
42 bool setProperty(QLottieLiteral::PropertyType propertyType, QVariant value) override;
43
44 void updateProperties(int frame) override;
45 void render(QLottieRenderer &renderer) const override;
46 bool acceptsTrim() const override;
47
48 QPointF position() const;
49 QSizeF size() const;
50 qreal roundness() const;
51
52protected:
53 QLottieSpatialProperty m_position;
54 QLottieProperty2D<QSizeF> m_size;
55 QLottieProperty<qreal> m_roundness;
56};
57
58QT_END_NAMESPACE
59
60#endif // QLOTTIERECT_P_H
61

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