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
qsgrectanglenode.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 QSGRECTANGLENODE_H
5#define QSGRECTANGLENODE_H
6
7#include <QtQuick/qsgnode.h>
8
10
11class Q_QUICK_EXPORT QSGRectangleNode : public QSGGeometryNode
12{
13public:
14 ~QSGRectangleNode() override = default;
15
16 virtual void setRect(const QRectF &rect) = 0;
17 inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); }
18 virtual QRectF rect() const = 0;
19
20 virtual void setColor(const QColor &color) = 0;
21 virtual QColor color() const = 0;
22};
23
25
26#endif // QSGRECTANGLENODE_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore\reentrant
Definition qrect.h:484
The QSGGeometryNode class is used for all rendered content in the scene graph.
Definition qsgnode.h:188
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
virtual QRectF rect() const =0
Returns the rectangle that this rect node covers.
virtual void setRect(const QRectF &rect)=0
Sets the rectangle of this rect node to rect.
virtual void setColor(const QColor &color)=0
Sets the color of this rectangle to color.
virtual QColor color() const =0
Returns the color of this rectangle.
~QSGRectangleNode() override=default
void setRect(qreal x, qreal y, qreal w, qreal h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
rect
[4]
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLuint color
[2]
GLint y
GLfloat GLfloat GLfloat GLfloat h
double qreal
Definition qtypes.h:187