Krita

FilterMask.h
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_FILTERMASK_H
7#define LIBKIS_FILTERMASK_H
8
9#include <QObject>
10#include "Node.h"
11#include "Filter.h"
12
13#include <kis_types.h>
14
15#include "kritalibkis_export.h"
16#include "libkis.h"
17
18/**
19 * @brief The FilterMask class
20 * A filter mask, unlike a filter layer, will add a non-destructive filter
21 * to the composited image of the node it is attached to.
22 *
23 * You can set grayscale pixeldata on the filter mask to adjust where the filter is applied.
24 *
25 * Filtermasks can be animated.
26 */
27
28class KRITALIBKIS_EXPORT FilterMask : public Node
29{
30 Q_OBJECT
31 Q_DISABLE_COPY(FilterMask)
32
33public:
34 explicit FilterMask(KisImageSP image, QString name, Filter &filter, QObject *parent = 0);
35 explicit FilterMask(KisImageSP image, KisFilterMaskSP mask, QObject *parent=0);
36 ~FilterMask() override;
37public Q_SLOTS:
38
39 /**
40 * @brief type Krita has several types of nodes, split in layers and masks. Group
41 * layers can contain other layers, any layer can contain masks.
42 *
43 * @return The type of the node. Valid types are:
44 * <ul>
45 * <li>paintlayer
46 * <li>grouplayer
47 * <li>filelayer
48 * <li>filterlayer
49 * <li>filllayer
50 * <li>clonelayer
51 * <li>vectorlayer
52 * <li>transparencymask
53 * <li>filtermask
54 * <li>transformmask
55 * <li>selectionmask
56 * <li>colorizemask
57 * </ul>
58 *
59 * If the Node object isn't wrapping a valid Krita layer or mask object, and
60 * empty string is returned.
61 */
62 QString type() const override;
63
64 void setFilter(Filter &filter);
65 Filter *filter();
66};
67
68#endif // LIBKIS_FILTERMASK_H
69
70
The FilterMask class A filter mask, unlike a filter layer, will add a non-destructive filter to the c...
Definition FilterMask.h:29
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition Node.h:22
virtual QString type() const
type Krita has several types of nodes, split in layers and masks.
Definition Node.cpp:456
Q_SCRIPTABLE bool setFilter(const QString &filter)
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 12 2024 12:05:12 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.