Krita

GroupLayer.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_GROUPLAYER_H
7#define LIBKIS_GROUPLAYER_H
8
9#include <QObject>
10#include "Node.h"
11
12#include <kis_types.h>
13
14#include "kritalibkis_export.h"
15#include "libkis.h"
16
17/**
18 * @brief The GroupLayer class
19 * A group layer is a layer that can contain other layers.
20 * In Krita, layers within a group layer are composited
21 * first before they are added into the composition code for where
22 * the group is in the stack. This has a significant effect on how
23 * it is interpreted for blending modes.
24 *
25 * PassThrough changes this behaviour.
26 *
27 * Group layer cannot be animated, but can contain animated layers or masks.
28 */
29class KRITALIBKIS_EXPORT GroupLayer : public Node
30{
31 Q_OBJECT
32 Q_DISABLE_COPY(GroupLayer)
33
34public:
35 explicit GroupLayer(KisImageSP image, QString name, QObject *parent = 0);
36 explicit GroupLayer(KisGroupLayerSP layer, QObject *parent = 0);
37 ~GroupLayer() override;
38public Q_SLOTS:
39
40 /**
41 * @brief type Krita has several types of nodes, split in layers and masks. Group
42 * layers can contain other layers, any layer can contain masks.
43 *
44 * @return grouplayer
45 */
46 virtual QString type() const override;
47
48 /**
49 * @brief setPassThroughMode
50 * This changes the way how compositing works.
51 * Instead of compositing all the layers before compositing it with the rest of the image,
52 * the group layer becomes a sort of formal way to organise everything.
53 *
54 * Passthrough mode is the same as it is in photoshop,
55 * and the inverse of SVG's isolation attribute(with passthrough=false being the same as
56 * isolation="isolate").
57 *
58 * @param passthrough whether or not to set the layer to passthrough.
59 */
60 void setPassThroughMode(bool passthrough);
61
62 /**
63 * @brief passThroughMode
64 * @return returns whether or not this layer is in passthrough mode. @see setPassThroughMode
65 */
66 bool passThroughMode() const;
67};
68
69#endif // LIBKIS_GROUPLAYER_H
70
The GroupLayer class A group layer is a layer that can contain other layers.
Definition GroupLayer.h:30
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition Node.h:24
virtual QString type() const
type Krita has several types of nodes, split in layers and masks.
Definition Node.cpp:463
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.