1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef BMRECT_P_H
5#define BMRECT_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 <QtBodymovin/private/bmshape_p.h>
24#include <QtBodymovin/private/bmproperty_p.h>
25#include <QtBodymovin/private/bmspatialproperty_p.h>
26#include <QtBodymovin/private/bmfill_p.h>
27#include <QtBodymovin/private/bmstroke_p.h>
28
29QT_BEGIN_NAMESPACE
30
31class BODYMOVIN_EXPORT BMRect : public BMShape
32{
33public:
34 BMRect() = default;
35 explicit BMRect(const BMRect &other);
36 BMRect(const QJsonObject &definition, const QVersionNumber &version, BMBase *parent = nullptr);
37
38 BMBase *clone() const override;
39
40 void construct(const QJsonObject &definition, const QVersionNumber &version);
41
42 bool setProperty(BMLiteral::PropertyType propertyType, QVariant value) override;
43
44 void updateProperties(int frame) override;
45 void render(LottieRenderer &renderer) const override;
46 bool acceptsTrim() const override;
47
48 QPointF position() const;
49 QSizeF size() const;
50 qreal roundness() const;
51
52protected:
53 BMSpatialProperty m_position;
54 BMProperty2D<QSizeF> m_size;
55 BMProperty<qreal> m_roundness;
56};
57
58QT_END_NAMESPACE
59
60#endif // BMRECT_P_H
61

source code of qtlottie/src/bodymovin/bmrect_p.h