89 void setRect(
const QRectF &)
override;
90 QRectF rect()
const override {
return m_rect; }
91 void setRadius(qreal radius);
92 void setColor(
const QColor &color)
override;
93 QColor color()
const override {
return m_color; }
94 void setMakTexture(QSGTexture *texture);
95 void setCorners(DQuickRectangle::Corners);
99 void updateGeometry();
102 const QSGGeometry::AttributeSet &ColoredCornerAttributes()
104 static QSGGeometry::Attribute data[] = {
105 QSGGeometry::Attribute::create(0, 2, GL_FLOAT,
true),
106 QSGGeometry::Attribute::create(1, 2, GL_FLOAT),
107 QSGGeometry::Attribute::create(2, 4, GL_UNSIGNED_BYTE)
114 QSGVertexColorMaterial m_material;
115 QSGGeometry m_geometry;
118 QSGGeometry m_cornerGeometry { ColoredCornerAttributes(), 0 };
119 QSGGeometryNode m_cornerNode;
122 bool m_geometryChanged =
false;
123 DQuickRectangle::Corners m_coners = DQuickRectangle::NoneCorner;
125 QColor m_color = QColor::Invalid;
126 QSGTexture *m_maskTexture =
nullptr;