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
5#ifndef QSGBASICINTERNALRECTANGLENODE_P_H
6#define QSGBASICINTERNALRECTANGLENODE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qsgadaptationlayer_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class Q_QUICK_PRIVATE_EXPORT QSGBasicInternalRectangleNode : public QSGInternalRectangleNode
24{
25public:
26 QSGBasicInternalRectangleNode();
27
28 void setRect(const QRectF &rect) override;
29 void setColor(const QColor &color) override;
30 void setPenColor(const QColor &color) override;
31 void setPenWidth(qreal width) override;
32 void setGradientStops(const QGradientStops &stops) override;
33 void setGradientVertical(bool vertical) override;
34 void setRadius(qreal radius) override;
35 void setAntialiasing(bool antialiasing) override;
36 void setAligned(bool aligned) override;
37 void update() override;
38
39protected:
40 virtual bool supportsAntialiasing() const { return true; }
41 virtual void updateMaterialAntialiasing() = 0;
42 virtual void updateMaterialBlending(QSGNode::DirtyState *state) = 0;
43
44 void updateGeometry();
45 void updateGradientTexture();
46
47 QRectF m_rect;
48 QGradientStops m_gradient_stops;
49 QColor m_color;
50 QColor m_border_color;
51 qreal m_radius;
52 qreal m_pen_width;
53
54 uint m_aligned : 1;
55 uint m_antialiasing : 1;
56 uint m_gradient_is_opaque : 1;
57 uint m_dirty_geometry : 1;
58 uint m_gradient_is_vertical : 1;
59
60 QSGGeometry m_geometry;
61};
62
63QT_END_NAMESPACE
64
65#endif
66

source code of qtdeclarative/src/quick/scenegraph/qsgbasicinternalrectanglenode_p.h