22 QColor color()
const {
return m_color; }
23 void setColor(
const QColor &color) { m_color = color; }
25 qreal relativeSizeX()
const {
return m_relativeSizeX; }
26 void setRelativeSizeX(qreal x) { m_relativeSizeX = x; }
28 qreal relativeSizeY()
const {
return m_relativeSizeY; }
29 void setRelativeSizeY(qreal y) { m_relativeSizeY = y; }
31 qreal spread()
const {
return m_spread; }
32 void setSpread(qreal spread) { m_spread = spread; }
34 QSGMaterialType *type()
const override;
35#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
36 QSGMaterialShader *createShader()
const override;
38 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const override;
41 int compare(
const QSGMaterial *)
const override;
45 qreal m_relativeSizeX;
46 qreal m_relativeSizeY;
68 void setRect(
const QRectF &);
69 void setColor(
const QColor &color);
70 void setGlowRadius(qreal radius);
71 void setRelativeSizeX(qreal x);
72 void setRelativeSizeY(qreal y);
73 void setSpread(qreal spread);
76 void updateGeometry();
77 bool geometryIsDirty()
const {
return m_geometryChanged; }
78 void accept(QSGNodeVisitorEx *visitor)
override {
if (visitor->visit(
this)) visitor->visitChildren(
this); visitor->endVisit(
this); }
80 static const QSGGeometry::AttributeSet &shadowAttributes()
82 static QSGGeometry::Attribute data[] = {
83 QSGGeometry::Attribute::create(0, 2, GL_FLOAT,
true),
84 QSGGeometry::Attribute::create(1, 2, GL_FLOAT)
86 static QSGGeometry::AttributeSet attributes = { 2,
sizeof(
ShadowVertex), data };
92 QSGGeometry m_geometry { shadowAttributes(), 0 };
95 bool m_geometryChanged =
true;