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
qsgdefaultninepatchnode.cpp
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
5
7
9 : m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4)
10{
12 setGeometry(&m_geometry);
13 setMaterial(&m_material);
14}
15
20
22{
23 delete m_material.texture();
24 m_material.setTexture(texture);
25}
26
28{
29 m_bounds = bounds;
30}
31
33{
34 m_devicePixelRatio = ratio;
35}
36
41
43{
44 rebuildGeometry(m_material.texture(), &m_geometry, m_padding, m_bounds, m_devicePixelRatio);
46}
47
\inmodule QtCore\reentrant
Definition qrect.h:484
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
Definition qsgnode.cpp:764
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
void setMaterial(QSGMaterial *material)
Sets the material of this geometry node to material.
Definition qsgnode.cpp:927
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
Definition qsggeometry.h:15
void setDrawingMode(unsigned int mode)
Sets the mode to be used for drawing this geometry.
static void rebuildGeometry(QSGTexture *texture, QSGGeometry *geometry, const QVector4D &padding, const QRectF &bounds, qreal dpr)
@ DirtyMaterial
Definition qsgnode.h:75
@ DirtyGeometry
Definition qsgnode.h:74
void markDirty(DirtyState bits)
Notifies all connected renderers that the node has dirty bits.
Definition qsgnode.cpp:624
void setTexture(QSGTexture *texture)
Sets the texture of this material to texture.
QSGTexture * texture() const
Returns this texture material's texture.
\inmodule QtQuick
Definition qsgtexture.h:20
The QVector4D class represents a vector or vertex in 4D space.
Definition qvectornd.h:330
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
GLenum GLuint texture
double qreal
Definition qtypes.h:187