diff options
Diffstat (limited to 'src/graphs/qml/quickgraphstexturedata_p.h')
-rw-r--r-- | src/graphs/qml/quickgraphstexturedata_p.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/graphs/qml/quickgraphstexturedata_p.h b/src/graphs/qml/quickgraphstexturedata_p.h new file mode 100644 index 00000000..aa50fec0 --- /dev/null +++ b/src/graphs/qml/quickgraphstexturedata_p.h @@ -0,0 +1,39 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the QtGraphs API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef QUICKGRAPHSTEXTUREDATA_P_H +#define QUICKGRAPHSTEXTUREDATA_P_H +#include <QtQuick3D/qquick3dtexturedata.h> +#include <QList> +#include <QLinearGradient> + +class QuickGraphsTextureData : public QQuick3DTextureData +{ + Q_OBJECT + +public: + QuickGraphsTextureData(); + ~QuickGraphsTextureData(); + + void createGradient(const QLinearGradient &gradient); + +private: + int m_width = 256; + int m_height = 256; + + QColor linearInterpolate(QColor startColor, QColor endColor, float value); + +}; + +#endif // QUICKGRAPHSTEXTUREDATA_P_H |