Krita Source Code Documentation
Loading...
Searching...
No Matches
Channel.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_CHANNEL_H
7#define LIBKIS_CHANNEL_H
8
9#include <QObject>
10
11#include "kritalibkis_export.h"
12#include "libkis.h"
13
14#include <KoChannelInfo.h>
15#include <kis_node.h>
16
22class KRITALIBKIS_EXPORT Channel : public QObject
23{
24 Q_OBJECT
25
26public:
27 explicit Channel(KisNodeSP node, KoChannelInfo *channel, QObject *parent = 0);
28 ~Channel() override;
29
30 bool operator==(const Channel &other) const;
31 bool operator!=(const Channel &other) const;
32
37 bool visible() const;
38
42 void setVisible(bool value);
43
47 QString name() const;
48
52 int position() const;
53
57 int channelSize() const;
58
62 QRect bounds() const;
63
70 QByteArray pixelData(const QRect &rect) const;
71
82 void setPixelData(QByteArray value, const QRect &rect);
83
84private:
85
86 struct Private;
87 Private *const d;
88
89};
90
91#endif // LIBKIS_CHANNEL_H
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
bool operator!=(const KoID &v1, const KoID &v2)
Definition KoID.h:103
Private *const d
Definition Channel.h:87
#define bounds(x, a, b)