Kirigami2

shadowedborderrectanglematerial.h
1/*
2 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include "shadowedrectanglematerial.h"
10
11/**
12 * A material rendering a rectangle with a shadow and a border.
13 *
14 * This material uses a distance field shader to render a rectangle with a
15 * shadow below it, optionally with rounded corners and a border.
16 */
18{
19public:
21
22 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override;
23 QSGMaterialType *type() const override;
24 int compare(const QSGMaterial *other) const override;
25
26 float borderWidth = 0.0;
27 QColor borderColor = Qt::black;
28
29 static QSGMaterialType staticType;
30};
31
32class ShadowedBorderRectangleShader : public ShadowedRectangleShader
33{
34public:
35 ShadowedBorderRectangleShader(ShadowedRectangleMaterial::ShaderType shaderType);
36
37 bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
38};
A material rendering a rectangle with a shadow and a border.
A material rendering a rectangle with a shadow.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:52:23 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.