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
qsgopenvgpublicnodes.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#include <QtQuick/qsgrectanglenode.h>
5#include <QtQuick/qsgimagenode.h>
6#include <QtQuick/qsgninepatchnode.h>
7
9
11
13{
14public:
17
18 void setRect(const QRectF &rect) override;
19 QRectF rect() const override;
20
21 void setColor(const QColor &color) override;
22 QColor color() const override;
23
24 void setTransform(const QOpenVGMatrix &transform) override;
25
26 void render() override;
27
28private:
29 QRectF m_rect;
30 QColor m_color;
31
32
33 bool m_pathDirty = true;
34 bool m_paintDirty = true;
35
36 VGPath m_rectPath;
37 VGPaint m_rectPaint;
38};
39
41{
42public:
45
46 void setRect(const QRectF &rect) override;
47 QRectF rect() const override;
48
49 void setSourceRect(const QRectF &r) override;
50 QRectF sourceRect() const override;
51
52 void setTexture(QSGTexture *texture) override;
53 QSGTexture *texture() const override;
54
56 QSGTexture::Filtering filtering() const override;
57
60
61 void setTextureCoordinatesTransform(TextureCoordinatesTransformMode transformNode) override;
62 TextureCoordinatesTransformMode textureCoordinatesTransform() const override;
63
66
67 void setOwnsTexture(bool owns) override;
68 bool ownsTexture() const override;
69
70 void render() override;
71
72private:
73 QSGTexture *m_texture;
74 QRectF m_rect;
75 QRectF m_sourceRect;
76 bool m_owns;
77 QSGTexture::Filtering m_filtering;
78 TextureCoordinatesTransformMode m_transformMode;
79};
80
82{
83public:
86
87 void setTexture(QSGTexture *texture) override;
88 void setBounds(const QRectF &bounds) override;
89 void setDevicePixelRatio(qreal ratio) override;
91 void update() override;
92
93 void render() override;
94
95 QRectF bounds() const;
96
97private:
98 QSGTexture *m_texture;
99 QRectF m_bounds;
100 qreal m_pixelRatio;
101 QMarginsF m_margins;
102};
103
105
106#endif // QSGOPENVGPUBLICNODES_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qmargins.h:270
\inmodule QtCore\reentrant
Definition qrect.h:484
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scen...
\inmodule QtQuick
void setOwnsTexture(bool owns) override
Sets whether the node takes ownership of the texture to owns.
void setTexture(QSGTexture *texture) override
Sets the texture of this image node to texture.
QSGTexture::AnisotropyLevel anisotropyLevel() const override
Returns this image node's anistropy level.
bool ownsTexture() const override
void setAnisotropyLevel(QSGTexture::AnisotropyLevel level) override
Sets this image node's anistropy level to level.
void setFiltering(QSGTexture::Filtering filtering) override
Sets the filtering to be used for this image node to filtering.
void setRect(const QRectF &rect) override
Sets the target rect of this image node to rect.
TextureCoordinatesTransformMode textureCoordinatesTransform() const override
Returns the mode used to generate texture coordinates for this node.
void setMipmapFiltering(QSGTexture::Filtering) override
Sets the mipmap filtering to be used for this image node to filtering.
QSGTexture::Filtering mipmapFiltering() const override
Returns the mipmap filtering for this image node.
QSGTexture::Filtering filtering() const override
Returns the filtering for this image node.
QRectF rect() const override
Returns the target rect of this image node.
QSGTexture * texture() const override
Returns the texture for this image node.
void setSourceRect(const QRectF &r) override
Sets the source rect of this image node to rect.
QRectF sourceRect() const override
Returns the source rect of this image node.
void setTextureCoordinatesTransform(TextureCoordinatesTransformMode transformNode) override
Sets the method used to generate texture coordinates to mode.
void setTexture(QSGTexture *texture) override
void setBounds(const QRectF &bounds) override
void setDevicePixelRatio(qreal ratio) override
void setPadding(qreal left, qreal top, qreal right, qreal bottom) override
QRectF rect() const override
Returns the rectangle that this rect node covers.
QColor color() const override
Returns the color of this rectangle.
void setRect(const QRectF &rect) override
Sets the rectangle of this rect node to rect.
void setTransform(const QOpenVGMatrix &transform) override
void setColor(const QColor &color) override
Sets the color of this rectangle to color.
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
\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
AnisotropyLevel
Specifies the anisotropic filtering level to be used when the texture is not screen aligned.
Definition qsgtexture.h:40
Combined button and popup list for selecting options.
GLenum GLuint GLint level
GLboolean r
[2]
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLuint color
[2]
GLint left
GLint GLint bottom
GLenum GLuint texture
GLuint GLenum GLenum transform
double qreal
Definition qtypes.h:187