Krita Source Code Documentation
Loading...
Searching...
No Matches
GroupLayer.cpp
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
#include "
GroupLayer.h
"
7
#include <
kis_group_layer.h
>
8
#include <
kis_image.h
>
9
10
GroupLayer::GroupLayer
(
KisImageSP
image, QString name, QObject *parent) :
11
Node
(image, new
KisGroupLayer
(image, name,
OPACITY_OPAQUE_U8
), parent)
12
{
13
14
}
15
16
GroupLayer::GroupLayer
(
KisGroupLayerSP
layer, QObject *parent):
17
Node
(layer->image(), layer, parent)
18
{
19
20
}
21
22
GroupLayer::~GroupLayer
()
23
{
24
25
}
26
27
void
GroupLayer::setPassThroughMode
(
bool
passthrough)
28
{
29
KisGroupLayer
*group =
dynamic_cast<
KisGroupLayer
*
>
(this->
node
().
data
());
30
KIS_SAFE_ASSERT_RECOVER_RETURN
(group);
31
group->
setPassThroughMode
(passthrough);
32
}
33
34
bool
GroupLayer::passThroughMode
()
const
35
{
36
const
KisGroupLayer
*group = qobject_cast<const KisGroupLayer*>(this->
node
());
37
return
group->
passThroughMode
();
38
}
39
40
QString
GroupLayer::type
()
const
41
{
42
return
"grouplayer"
;
43
}
GroupLayer.h
OPACITY_OPAQUE_U8
const quint8 OPACITY_OPAQUE_U8
Definition
KoColorSpaceConstants.h:15
GroupLayer::passThroughMode
bool passThroughMode() const
passThroughMode
Definition
GroupLayer.cpp:34
GroupLayer::setPassThroughMode
void setPassThroughMode(bool passthrough)
setPassThroughMode This changes the way how compositing works. Instead of compositing all the layers ...
Definition
GroupLayer.cpp:27
GroupLayer::type
virtual QString type() const override
type Krita has several types of nodes, split in layers and masks. Group layers can contain other laye...
Definition
GroupLayer.cpp:40
GroupLayer::~GroupLayer
~GroupLayer() override
Definition
GroupLayer.cpp:22
KisSharedPtr< KisImage >
KisSharedPtr::data
T * data()
Definition
kis_shared_ptr.h:139
Node
Definition
Node.h:24
Node::node
KisNodeSP node() const
Definition
Node.cpp:827
Node::GroupLayer
friend class GroupLayer
Definition
Node.h:698
KIS_SAFE_ASSERT_RECOVER_RETURN
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition
kis_assert.h:128
kis_group_layer.h
kis_image.h
KisGroupLayer
Definition
kis_group_layer.cc:33
KisGroupLayer::passThroughMode
bool passThroughMode
Definition
kis_group_layer.cc:46
KisGroupLayer::setPassThroughMode
void setPassThroughMode(bool value)
Definition
kis_group_layer.cc:325
libs
libkis
GroupLayer.cpp
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52