Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgbasicinternalrectanglenode_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// Qt-Security score:significant reason:default
4
5
6#ifndef QSGBASICINTERNALRECTANGLENODE_P_H
7#define QSGBASICINTERNALRECTANGLENODE_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <private/qsgadaptationlayer_p.h>
21
23
24class Q_QUICK_EXPORT QSGBasicInternalRectangleNode : public QSGInternalRectangleNode
25{
26public:
27 QSGBasicInternalRectangleNode();
28
29 void setRect(const QRectF &rect) override;
30 void setColor(const QColor &color) override;
31 void setPenColor(const QColor &color) override;
32 void setPenWidth(qreal width) override;
33 void setGradientStops(const QGradientStops &stops) override;
34 void setGradientVertical(bool vertical) override;
35 void setRadius(qreal radius) override;
36 void setTopLeftRadius(qreal radius) override;
37 void setTopRightRadius(qreal radius) override;
38 void setBottomLeftRadius(qreal radius) override;
39 void setBottomRightRadius(qreal radius) override;
40 void resetTopLeftRadius() override;
41 void resetTopRightRadius() override;
42 void resetBottomLeftRadius() override;
43 void resetBottomRightRadius() override;
44 void setAntialiasing(bool antialiasing) override;
45 void setAligned(bool aligned) override;
46 void update() override;
47
48protected:
49 virtual bool supportsAntialiasing() const { return true; }
50 virtual void updateMaterialAntialiasing() = 0;
51 virtual void updateMaterialBlending(QSGNode::DirtyState *state) = 0;
52
53 void updateGeometry();
54 void updateGradientTexture();
55
56 QRectF m_rect;
57 QGradientStops m_gradient_stops;
58 QColor m_color;
59 QColor m_border_color;
60 float m_radius = 0.0f;
61 float m_topLeftRadius = 0.0f;
62 float m_topRightRadius = 0.0f;
63 float m_bottomLeftRadius = 0.0f;
64 float m_bottomRightRadius = 0.0f;
65 float m_pen_width = 0.0f;
66
67 uint m_aligned : 1;
68 uint m_antialiasing : 1;
69 uint m_gradient_is_opaque : 1;
70 uint m_dirty_geometry : 1;
71 uint m_gradient_is_vertical : 1;
72
73 uint m_isTopLeftRadiusSet : 1;
74 uint m_isTopRightRadiusSet : 1;
75 uint m_isBottomLeftRadiusSet : 1;
76 uint m_isBottomRightRadiusSet : 1;
77
78 QSGGeometry m_geometry;
79};
80
81QT_END_NAMESPACE
82
83#endif
Combined button and popup list for selecting options.
const QSGGeometry::AttributeSet & smoothAttributeSet()
Color4ub colorToColor4ub(const QColor &c)
Color4ub operator*(Color4ub c, float t)
Color4ub operator+(Color4ub a, Color4ub b)
void set(float primary, float secondary, Color4ub ncolor, float dPrimary, float dSecondary, bool vertical)
void set(float primary, float secondary, Color4ub ncolor, bool vertical)