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