1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSGSOFTWARESPRITENODE_H
5#define QSGSOFTWARESPRITENODE_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 <private/qtquickglobal_p.h>
19
20QT_REQUIRE_CONFIG(quick_sprite);
21
22#include <private/qsgadaptationlayer_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QSGSoftwarePixmapTexture;
27class QSGSoftwareSpriteNode : public QSGSpriteNode
28{
29public:
30 QSGSoftwareSpriteNode();
31 ~QSGSoftwareSpriteNode() override;
32
33 void setTexture(QSGTexture *texture) override;
34 void setTime(float time) override;
35 void setSourceA(const QPoint &source) override;
36 void setSourceB(const QPoint &source) override;
37 void setSpriteSize(const QSize &size) override;
38 void setSheetSize(const QSize &size) override;
39 void setSize(const QSizeF &size) override;
40 void setFiltering(QSGTexture::Filtering filtering) override;
41 void update() override;
42
43 void paint(QPainter *painter);
44 bool isOpaque() const;
45 QRectF rect() const;
46
47private:
48
49 QSGSoftwarePixmapTexture *m_texture = nullptr;
50 float m_time;
51 QPoint m_sourceA;
52 QPoint m_sourceB;
53 QSize m_spriteSize;
54 QSize m_sheetSize;
55 QSizeF m_size;
56
57};
58
59QT_END_NAMESPACE
60
61#endif // QSGSOFTWARESPRITENODE_H
62

source code of qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode_p.h