DtkDeclarative
DTK Declarative module
载入中...
搜索中...
未找到
dcoloroverlaynode.h
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DSOFTWARECOLOROVERLAYNODE_H
6#define DSOFTWARECOLOROVERLAYNODE_H
7
8#include "dsoftwareeffectrendernode.h"
9
10#include <dtkdeclarative_global.h>
11
12DQUICK_BEGIN_NAMESPACE
13
15{
16public:
17 explicit DSoftwareColorOverlayNode(QSGTextureProvider *sourceProvider);
18 void setColor(QColor color);
19
20 void sync(QQuickItem *item) override;
21 QRectF rect() const override { return QRect(0, 0, static_cast<int>(m_width), static_cast<int>(m_height)); }
22 QImage process(const QImage &sourceImage, QPainter::RenderHints hints) override;
23
24private:
25 QColor m_color = Qt::transparent;
26 qreal m_width = 0;
27 qreal m_height = 0;
28 QQuickItem *m_item = nullptr;
29};
30
31DQUICK_END_NAMESPACE
32
33#endif // DSOFTWARECOLOROVERLAYNODE_H
Definition dcoloroverlaynode.h:15
Definition dsoftwareeffectrendernode.h:27