Krita Source Code Documentation
Loading...
Searching...
No Matches
ColorizeMask.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_COLORIZEMASK_H
7#define LIBKIS_COLORIZEMASK_H
8
9#include <QObject>
10#include "Node.h"
11#include "ManagedColor.h"
12
13#include <kis_types.h>
14
15#include "kritalibkis_export.h"
16#include "libkis.h"
17
59class KRITALIBKIS_EXPORT ColorizeMask : public Node
60{
61 Q_OBJECT
62 Q_DISABLE_COPY(ColorizeMask)
63
64public:
65 explicit ColorizeMask(KisImageSP image, QString name, QObject *parent = 0);
66 explicit ColorizeMask(KisImageSP image, KisColorizeMaskSP mask, QObject *parent = 0);
67 ~ColorizeMask() override;
68public Q_SLOTS:
69
79 virtual QString type() const override;
80
86 QList<ManagedColor*> keyStrokesColors() const;
87
94 void initializeKeyStrokeColors(QList<ManagedColor*> colors, int transparentIndex = -1);
95
101 void removeKeyStroke(ManagedColor* color);
102
108 int transparencyIndex() const;
109
121 QByteArray keyStrokePixelData(ManagedColor* color, int x, int y, int w, int h) const;
122
139 bool setKeyStrokePixelData(QByteArray value, ManagedColor* color, int x, int y, int w, int h);
140
146 void setUseEdgeDetection(bool value);
147
152 bool useEdgeDetection() const;
153
159 void setEdgeDetectionSize(qreal value);
160
165 qreal edgeDetectionSize() const;
166
172 void setCleanUpAmount(qreal value);
173
178 qreal cleanUpAmount() const;
179
185 void setLimitToDeviceBounds(bool value);
186
191 bool limitToDeviceBounds() const;
192
198 void updateMask(bool force = false);
199
200 void resetCache();
201
207 bool showOutput() const;
208
214 void setShowOutput(bool enabled);
215
221 bool editKeyStrokes() const;
222
228 void setEditKeyStrokes(bool enabled);
229
230};
231
232#endif // LIBKIS_COLORIZEMASK_H
233
234
float value(const T *src, size_t ch)
The ColorizeMask class A colorize mask is a mask type node that can be used to color in line art.
The ManagedColor class is a class to handle colors that are color managed. A managed color is a color...
Definition Node.h:24
virtual QString type() const
type Krita has several types of nodes, split in layers and masks. Group layers can contain other laye...
Definition Node.cpp:463
friend class ColorizeMask
Definition Node.h:707