Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgsoftwarespritenode_p.h
Go to the documentation of this file.
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
25
27class QSGSoftwareSpriteNode : public QSGSpriteNode
28{
29public:
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
60
61#endif // QSGSOFTWARESPRITENODE_H
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:484
void setSize(const QSizeF &size) override
void setTexture(QSGTexture *texture) override
void setTime(float time) override
void setSourceB(const QPoint &source) override
void setSpriteSize(const QSize &size) override
void setFiltering(QSGTexture::Filtering filtering) override
void setSheetSize(const QSize &size) override
void setSourceA(const QPoint &source) override
\inmodule QtQuick
Definition qsgtexture.h:20
Filtering
Specifies how sampling of texels should filter when texture coordinates are not pixel aligned.
Definition qsgtexture.h:34
\inmodule QtCore
Definition qsize.h:208
\inmodule QtCore
Definition qsize.h:25
QPainter paint
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint texture
GLsizei GLsizei GLchar * source
#define QT_REQUIRE_CONFIG(feature)
QPainter painter(this)
[7]