1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QLOTTIEIMAGE_P_H
5#define QLOTTIEIMAGE_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 <QImage>
19#include <QPointF>
20#include <QUrl>
21
22#include <QtLottie/private/qlottieproperty_p.h>
23#include <QtLottie/private/qlottiespatialproperty_p.h>
24
25QT_BEGIN_NAMESPACE
26
27class QJsonObject;
28
29class Q_LOTTIE_EXPORT QLottieImage : public QLottieBase
30{
31public:
32 QLottieImage() = default;
33 explicit QLottieImage(const QLottieImage &other);
34 QLottieImage(const QJsonObject &definition, QLottieBase *parent = nullptr);
35
36 QLottieBase *clone() const override;
37
38 void construct(const QJsonObject &definition);
39
40 void render(QLottieRenderer &renderer) const override;
41
42 QUrl url() const { return m_url; }
43 QSizeF size() const { return m_size; }
44 QImage image() const { return m_image; }
45
46protected:
47 QUrl m_url;
48 QSizeF m_size;
49 QImage m_image;
50};
51
52QT_END_NAMESPACE
53
54#endif // QLOTTIEIMAGE_P_H
55

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