Kirigami2

shadowedbordertexturematerial.h
1 /*
2  * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 #pragma once
8 
9 #include <QSGTexture>
10 
11 #include "shadowedborderrectanglematerial.h"
12 
13 class ShadowedBorderTextureMaterial : public ShadowedBorderRectangleMaterial
14 {
15 public:
16  ShadowedBorderTextureMaterial();
17 
18 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
19  QSGMaterialShader *createShader() const override;
20 #else
21  QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override;
22 #endif
23  QSGMaterialType *type() const override;
24  int compare(const QSGMaterial *other) const override;
25 
26  QSGTexture *textureSource = nullptr;
27 
28  static QSGMaterialType staticType;
29 };
30 
31 class ShadowedBorderTextureShader : public ShadowedBorderRectangleShader
32 {
33 public:
34  ShadowedBorderTextureShader(ShadowedRectangleMaterial::ShaderType shaderType);
35 
36 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
37  void initialize() override;
38  void updateState(const QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
39 #else
40  void
41  updateSampledImage(QSGMaterialShader::RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
42 #endif
43 };
Type type(const QSqlDatabase &db)
virtual void initialize()
A material rendering a rectangle with a shadow and a border.
virtual QSGMaterialShader * createShader() const const=0
virtual void updateState(const QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.