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
10GroupLayer::GroupLayer(KisImageSP image, QString name, QObject *parent) :
11 Node(image, new KisGroupLayer(image, name, OPACITY_OPAQUE_U8), parent)
12{
13
14}
15
17 Node(layer->image(), layer, parent)
18{
19
20}
21
26
27void GroupLayer::setPassThroughMode(bool passthrough)
28{
29 KisGroupLayer *group = dynamic_cast<KisGroupLayer*>(this->node().data());
31 group->setPassThroughMode(passthrough);
32}
33
35{
36 const KisGroupLayer *group = qobject_cast<const KisGroupLayer*>(this->node());
37 return group->passThroughMode();
38}
39
40QString GroupLayer::type() const
41{
42 return "grouplayer";
43}
const quint8 OPACITY_OPAQUE_U8
bool passThroughMode() const
passThroughMode
void setPassThroughMode(bool passthrough)
setPassThroughMode This changes the way how compositing works. Instead of compositing all the layers ...
virtual QString type() const override
type Krita has several types of nodes, split in layers and masks. Group layers can contain other laye...
~GroupLayer() override
Definition Node.h:24
KisNodeSP node() const
Definition Node.cpp:827
friend class GroupLayer
Definition Node.h:698
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
void setPassThroughMode(bool value)