Krita Source Code Documentation
Loading...
Searching...
No Matches
Node Class Reference

#include <Node.h>

+ Inheritance diagram for Node:

Classes

struct  Private
 

Public Slots

bool addChildNode (Node *child, Node *above)
 addChildNode adds the given node in the list of children.
 
bool alphaLocked () const
 alphaLocked checks whether the node is a paint layer and returns whether it is alpha locked
 
bool animated () const
 Krita layers can be animated, i.e., have frames.
 
QString blendingMode () const
 
QRect bounds () const
 bounds return the exact bounds of the node's paint device
 
QList< Channel * > channels () const
 channels creates a list of Channel objects that can be used individually to show or hide certain channels, and to retrieve the contents of each channel in a node separately.
 
QList< Node * > childNodes () const
 childNodes
 
Node * clone () const
 clone clone the current node. The node is not associated with any image.
 
bool collapsed () const
 
QString colorDepth () const
 
int colorLabel () const
 
QString colorModel () const
 colorModel retrieve the current color model of this document:
 
QString colorProfile () const
 
void cropNode (int x, int y, int w, int h)
 cropNode crop this layer.
 
Node * duplicate ()
 duplicate returns a full copy of the current node. The node is not inserted in the graphic
 
void enableAnimation () const
 enableAnimation make the current layer animated, so it can have frames.
 
QList< Node * > findChildNodes (const QString &name=QString(), bool recursive=false, bool partialMatch=false, const QString &type=QString(), int colorLabelIndex=0) const
 findChildNodes
 
bool hasExtents ()
 does the node have any content in it?
 
bool hasKeyframeAtTime (int frameNumber)
 
QIcon icon () const
 icon
 
int index () const
 index the index of the node inside the parent
 
bool inheritAlpha () const
 inheritAlpha checks whether this node has the inherits alpha flag set
 
bool isPinnedToTimeline () const
 
QString layerStyleToAsl ()
 layerStyleToAsl retrieve the current layer's style in ASL format.
 
bool locked () const
 locked checks whether the Node is locked. A locked node cannot be changed.
 
Node * mergeDown ()
 mergeDown merges the given node with the first visible node underneath this node in the layerstack. This will drop all per-layer metadata.
 
void move (int x, int y)
 
QString name () const
 
int opacity () const
 
QString paintAbility ()
 paintAbility can be used to determine whether this node can be painted on with the current brush preset.
 
void paintEllipse (const QRectF &rect, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
 paint an ellipse on the canvas. Uses current brush preset
 
void paintLine (const QPointF pointOne, const QPointF pointTwo, double pressureOne=1.0, double pressureTwo=1.0, const QString strokeStyle=PaintingResources::defaultStrokeStyle)
 paint a line on the canvas. Uses current brush preset
 
void paintPath (const QPainterPath &path, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
 paint a custom path on the canvas. Uses current brush preset
 
void paintPolygon (const QList< QPointF > points, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
 paint a polygon on the canvas. Uses current brush preset
 
void paintPolylineStroke (const QList< StrokePoint > &points, const QString strokeStyle=PaintingResources::defaultStrokeStyle)
 paintPolylineStroke paint one continuous brush stroke with complete input information for every supplied point. Uses the current brush preset.
 
void paintRectangle (const QRectF &rect, const QString strokeStyle=PaintingResources::defaultStrokeStyle, const QString fillStyle=PaintingResources::defaultFillStyle)
 paint a rectangle on the canvas. Uses current brush preset
 
Node * parentNode () const
 
QByteArray pixelData (int x, int y, int w, int h) const
 pixelData reads the given rectangle from the Node's paintable pixels, if those exist, and returns it as a byte array. The pixel data starts top-left, and is ordered row-first.
 
QByteArray pixelDataAtTime (int x, int y, int w, int h, int time) const
 pixelDataAtTime a basic function to get pixeldata from an animated node at a given time.
 
QPoint position () const
 position returns the position of the paint device of this node. The position is always 0,0 unless the layer has been moved. If you want to know the topleft position of the rectangle around the actual non-transparent pixels in the node, use bounds().
 
QByteArray projectionPixelData (int x, int y, int w, int h) const
 projectionPixelData reads the given rectangle from the Node's projection (that is, what the node looks like after all sub-Nodes (like layers in a group or masks on a layer) have been applied, and returns it as a byte array. The pixel data starts top-left, and is ordered row-first.
 
bool remove ()
 remove removes this node from its parent image.
 
bool removeChildNode (Node *child)
 removeChildNode removes the given node from the list of children.
 
void rotateNode (double radians)
 rotateNode rotate this layer by the given radians.
 
bool save (const QString &filename, double xRes, double yRes, const InfoObject &exportConfiguration, const QRect &exportRect=QRect())
 save exports the given node with this filename. The extension of the filename determines the filetype.
 
void scaleNode (QPointF origin, int width, int height, QString strategy)
 scaleNode
 
void setAlphaLocked (bool value)
 setAlphaLocked set the layer to value if the node is paint layer.
 
void setBlendingMode (QString value)
 setBlendingMode set the blending mode of the node to the given value
 
void setChildNodes (QList< Node * > nodes)
 setChildNodes this replaces the existing set of child nodes with the new set.
 
void setCollapsed (bool collapsed)
 
void setColorLabel (int index)
 setColorLabel sets a color label index associated to the layer. The actual color of the label and the number of available colors is defined by Krita GUI configuration.
 
bool setColorProfile (const QString &colorProfile)
 setColorProfile set the color profile of the image to the given profile. The profile has to be registered with krita and be compatible with the current color model and depth; the image data is not converted.
 
bool setColorSpace (const QString &colorModel, const QString &colorDepth, const QString &colorProfile)
 setColorSpace convert the node to the given colorspace
 
void setInheritAlpha (bool value)
 
bool setLayerStyleFromAsl (const QString &asl)
 setLayerStyleFromAsl set a new layer style for this node.
 
void setLocked (bool value)
 
void setName (QString name)
 
void setOpacity (int value)
 
void setPinnedToTimeline (bool pinned) const
 Sets whether or not node should be pinned to the Timeline Docker, regardless of selection activity.
 
bool setPixelData (QByteArray value, int x, int y, int w, int h)
 setPixelData writes the given bytes, of which there must be enough, into the Node, if the Node has writable pixel data:
 
void setVisible (bool visible)
 
void shearNode (double angleX, double angleY)
 shearNode perform a shear operation on this node.
 
QImage thumbnail (int w, int h)
 thumbnail create a thumbnail of the given dimensions. The thumbnail is sized according to the layer dimensions, not the image dimensions. If the requested size is too big a null QImage is created. If the current node cannot generate a thumbnail, a transparent QImage of the requested size is generated.
 
virtual QString type () const
 type Krita has several types of nodes, split in layers and masks. Group layers can contain other layers, any layer can contain masks.
 
QUuid uniqueId () const
 uniqueId uniqueId of the node
 
bool visible () const
 

Public Member Functions

bool operator!= (const Node &other) const
 
bool operator== (const Node &other) const
 
 ~Node () override
 

Static Public Member Functions

static Node * createNode (KisImageSP image, KisNodeSP node, QObject *parent=0)
 

Private Member Functions

KisImageSP image () const
 
KisNodeSP node () const
 
 Node (KisImageSP image, KisNodeSP node, QObject *parent=0)
 
KisPaintDeviceSP paintDevice () const
 paintDevice gives access to the internal paint device of this Node
 

Private Attributes

Private *const d
 

Friends

class CloneLayer
 
class ColorizeMask
 
class Document
 
class FileLayer
 
class FillLayer
 
class Filter
 
class FilterLayer
 
class FilterMask
 
class GroupLayer
 
class Selection
 
class SelectionMask
 
class TransformMask
 
class TransparencyMask
 
class VectorLayer
 

Detailed Description

Node represents a layer or mask in a Krita image's Node hierarchy. Group layers can contain other layers and masks; layers can contain masks.

Definition at line 24 of file Node.h.

Constructor & Destructor Documentation

◆ ~Node()

Node::~Node ( )
override

Definition at line 137 of file Node.cpp.

138{
139 delete d;
140}
Private *const d
Definition Node.h:737

References d.

◆ Node()

Node::Node ( KisImageSP image,
KisNodeSP node,
QObject * parent = 0 )
explicitprivate

Definition at line 86 of file Node.cpp.

87 : QObject(parent)
88 , d(new Private)
89{
90 d->image = image;
91 d->node = node;
92}
KisNodeSP node() const
Definition Node.cpp:828
KisImageSP image() const
Definition Node.cpp:823
KisImageWSP image
Definition Node.cpp:82
KisNodeSP node
Definition Node.cpp:83

References d, Node::Private::image, image(), Node::Private::node, and node().

Member Function Documentation

◆ addChildNode

bool Node::addChildNode ( Node * child,
Node * above )
slot

addChildNode adds the given node in the list of children.

Parameters
childthe node to be added
abovethe node above which this node will be placed
Returns
false if adding the node failed

Definition at line 268 of file Node.cpp.

269{
270 if (!d->node) return false;
271
272 KUndo2Command *cmd = 0;
273
274 if (above) {
275 cmd = new KisImageLayerAddCommand(d->image, child->node(), d->node, above->node());
276 } else {
277 cmd = new KisImageLayerAddCommand(d->image, child->node(), d->node, d->node->childCount());
278 }
279
281 d->image->waitForDone();
282
283 return true;
284}
The command for adding a layer.
void waitForDone()
static void runSingleCommandStroke(KisImageSP image, KUndo2Command *cmd, KisStrokeJobData::Sequentiality sequentiality=KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::Exclusivity exclusivity=KisStrokeJobData::NORMAL)
runSingleCommandStroke creates a stroke and runs cmd in it. The text() field of cmd is used as a titl...
quint32 childCount() const
Definition kis_node.cpp:414

References KisNode::childCount(), d, Node::Private::image, Node::Private::node, node(), KisProcessingApplicator::runSingleCommandStroke(), and KisImage::waitForDone().

◆ alphaLocked

bool Node::alphaLocked ( ) const
slot

alphaLocked checks whether the node is a paint layer and returns whether it is alpha locked

Returns
whether the paint layer is alpha locked, or false if the node is not a paint layer

Definition at line 161 of file Node.cpp.

162{
163 if (!d->node) return false;
164 KisPaintLayerSP paintLayer = qobject_cast<KisPaintLayer*>(d->node.data());
165 if (paintLayer) {
166 return paintLayer->alphaLocked();
167 }
168 return false;
169}
bool alphaLocked() const

References KisPaintLayer::alphaLocked(), d, KisSharedPtr< T >::data(), and Node::Private::node.

◆ animated

bool Node::animated ( ) const
slot

Krita layers can be animated, i.e., have frames.

Returns
return true if the layer has frames. Currently, the scripting framework does not give access to the animation features.

Definition at line 362 of file Node.cpp.

363{
364 if (!d->node) return false;
365 return d->node->isAnimated();
366}
bool isAnimated() const

References d, KisBaseNode::isAnimated(), and Node::Private::node.

◆ blendingMode

QString Node::blendingMode ( ) const
slot
Returns
the blending mode of the layer. The values of the blending modes are defined in
See also
KoCompositeOpRegistry.h

Definition at line 181 of file Node.cpp.

182{
183 if (!d->node) return QString();
184
185 return d->node->compositeOpId();
186}
const QString & compositeOpId() const

References KisBaseNode::compositeOpId(), d, and Node::Private::node.

◆ bounds

QRect Node::bounds ( ) const
slot

bounds return the exact bounds of the node's paint device

Returns
the bounds, or an empty QRect if the node has no paint device or is empty.

Definition at line 616 of file Node.cpp.

617{
618 if (!d->node) return QRect();
619 return d->node->exactBounds();
620}
virtual QRect exactBounds() const

References d, KisBaseNode::exactBounds(), and Node::Private::node.

◆ channels

QList< Channel * > Node::channels ( ) const
slot

channels creates a list of Channel objects that can be used individually to show or hide certain channels, and to retrieve the contents of each channel in a node separately.

Only layers have channels, masks do not, and calling channels on a Node that is a mask will return an empty list.

Returns
the list of channels ordered in by position of the channels in pixel position

Definition at line 200 of file Node.cpp.

201{
203
204 if (!d->node) return channels;
205 if (!d->node->inherits("KisLayer")) return channels;
206
207 Q_FOREACH(KoChannelInfo *info, d->node->colorSpace()->channels()) {
208 Channel *channel = new Channel(d->node, info);
209 channels << channel;
210 }
211
212 return channels;
213}
QList< KoChannelInfo * > channels
QList< Channel * > channels() const
channels creates a list of Channel objects that can be used individually to show or hide certain chan...
Definition Node.cpp:200
virtual const KoColorSpace * colorSpace() const =0

References channels(), KoColorSpace::channels, KisBaseNode::colorSpace(), d, and Node::Private::node.

◆ childNodes

QList< Node * > Node::childNodes ( ) const
slot

childNodes

Returns
returns a list of child nodes of the current node. The nodes are ordered from the bottommost up. The function is not recursive.

Definition at line 215 of file Node.cpp.

216{
217 QList<Node*> nodes;
218 if (d->node) {
219 KisNodeList nodeList;
220 int childCount = d->node->childCount();
221 for (int i = 0; i < childCount; ++i) {
222 nodeList << d->node->at(i);
223 }
224 nodes = LibKisUtils::createNodeList(nodeList, d->image);
225 }
226 return nodes;
227}
QList< Node * > createNodeList(KisNodeList kisnodes, KisImageWSP image)
KisNodeSP at(quint32 index) const
Definition kis_node.cpp:421

References KisNode::at(), KisNode::childCount(), LibKisUtils::createNodeList(), d, Node::Private::image, and Node::Private::node.

◆ clone

Node * Node::clone ( ) const
slot

clone clone the current node. The node is not associated with any image.

Definition at line 153 of file Node.cpp.

154{
155 KisNodeSP clone = d->node->clone();
157 return node;
158}
Definition Node.h:25
static Node * createNode(KisImageSP image, KisNodeSP node, QObject *parent=0)
Definition Node.cpp:94
Node * clone() const
clone clone the current node. The node is not associated with any image.
Definition Node.cpp:153
virtual KisNodeSP clone() const =0

References clone(), KisNode::clone(), createNode(), d, Node::Private::node, and node().

◆ collapsed

bool Node::collapsed ( ) const
slot

returns the collapsed state of this node

Definition at line 386 of file Node.cpp.

387{
388 if (!d->node) return false;
389 return d->node->collapsed();
390}

References KisBaseNode::collapsed, d, and Node::Private::node.

◆ colorDepth

QString Node::colorDepth ( ) const
slot

colorDepth A string describing the color depth of the image:

  • U8: unsigned 8 bits integer, the most common type
  • U16: unsigned 16 bits integer
  • F16: half, 16 bits floating point. Only available if Krita was built with OpenEXR
  • F32: 32 bits floating point
Returns
the color depth.

Definition at line 315 of file Node.cpp.

316{
317 if (!d->node) return "";
318 if (!d->node->projection()) return d->node->colorSpace()->colorDepthId().id();
319 return d->node->projection()->colorSpace()->colorDepthId().id();
320}
const KoColorSpace * colorSpace() const
virtual KoID colorDepthId() const =0
QString id() const
Definition KoID.cpp:63
virtual KisPaintDeviceSP projection() const =0

References KoColorSpace::colorDepthId(), KisPaintDevice::colorSpace(), KisBaseNode::colorSpace(), d, KoID::id(), Node::Private::node, and KisBaseNode::projection().

◆ colorLabel

int Node::colorLabel ( ) const
slot

Sets a color label index associated to the layer. The actual color of the label and the number of available colors is defined by Krita GUI configuration.

Definition at line 303 of file Node.cpp.

304{
305 if (!d->node) return 0;
306 return d->node->colorLabelIndex();
307}
int colorLabelIndex() const

References KisBaseNode::colorLabelIndex(), d, and Node::Private::node.

◆ colorModel

QString Node::colorModel ( ) const
slot

colorModel retrieve the current color model of this document:

  • A: Alpha mask
  • RGBA: RGB with alpha channel (The actual order of channels is most often BGR!)
  • XYZA: XYZ with alpha channel
  • LABA: LAB with alpha channel
  • CMYKA: CMYK with alpha channel
  • GRAYA: Gray with alpha channel
  • YCbCrA: YCbCr with alpha channel
Returns
the internal color model string.

Definition at line 322 of file Node.cpp.

323{
324 if (!d->node) return "";
325 if (!d->node->projection()) return d->node->colorSpace()->colorModelId().id();
326 return d->node->projection()->colorSpace()->colorModelId().id();
327}
virtual KoID colorModelId() const =0

References KoColorSpace::colorModelId(), KisPaintDevice::colorSpace(), KisBaseNode::colorSpace(), d, KoID::id(), Node::Private::node, and KisBaseNode::projection().

◆ colorProfile

QString Node::colorProfile ( ) const
slot
Returns
the name of the current color profile

Definition at line 330 of file Node.cpp.

331{
332 if (!d->node) return "";
333 if (!d->node->projection()) return d->node->colorSpace()->profile()->name();
334 return d->node->projection()->colorSpace()->profile()->name();
335}
virtual const KoColorProfile * profile() const =0

References KisPaintDevice::colorSpace(), KisBaseNode::colorSpace(), d, KoColorProfile::name, Node::Private::node, KoColorSpace::profile(), and KisBaseNode::projection().

◆ createNode()

Node * Node::createNode ( KisImageSP image,
KisNodeSP node,
QObject * parent = 0 )
static

Definition at line 94 of file Node.cpp.

95{
96 if (node.isNull()) {
97 return 0;
98 }
99 if (node->inherits("KisGroupLayer")) {
100 return new GroupLayer(dynamic_cast<KisGroupLayer*>(node.data()));
101 }
102 else if (node->inherits("KisCloneLayer")) {
103 return new CloneLayer(dynamic_cast<KisCloneLayer*>(node.data()));
104 }
105 else if (node->inherits("KisFileLayer")) {
106 return new FileLayer(dynamic_cast<KisFileLayer*>(node.data()));
107 }
108 else if (node->inherits("KisAdjustmentLayer")) {
109 return new FilterLayer(dynamic_cast<KisAdjustmentLayer*>(node.data()));
110 }
111 else if (node->inherits("KisGeneratorLayer")) {
112 return new FillLayer(dynamic_cast<KisGeneratorLayer*>(node.data()));
113 }
114 else if (node->inherits("KisShapeLayer")) {
115 return new VectorLayer(dynamic_cast<KisShapeLayer*>(node.data()));
116 }
117 else if (node->inherits("KisFilterMask")) {
118 return new FilterMask(image, dynamic_cast<KisFilterMask*>(node.data()));
119 }
120 else if (node->inherits("KisSelectionMask")) {
121 return new SelectionMask(image, dynamic_cast<KisSelectionMask*>(node.data()));
122 }
123 else if (node->inherits("KisTransparencyMask")) {
124 return new TransparencyMask(image, dynamic_cast<KisTransparencyMask*>(node.data()));
125 }
126 else if (node->inherits("KisTransformMask")) {
127 return new TransformMask(image, dynamic_cast<KisTransformMask*>(node.data()));
128 }
129 else if (node->inherits("KisColorizeMask")) {
130 return new ColorizeMask(image, dynamic_cast<KisColorizeMask*>(node.data()));
131 }
132 else {
133 return new Node(image, node, parent);
134 }
135}
The KisFileLayer class loads a particular file as a layer into the layer stack.
bool isNull() const
Node(KisImageSP image, KisNodeSP node, QObject *parent=0)
Definition Node.cpp:86
friend class FilterMask
Definition Node.h:719
friend class TransparencyMask
Definition Node.h:721
friend class SelectionMask
Definition Node.h:720
friend class FilterLayer
Definition Node.h:716
friend class FileLayer
Definition Node.h:715
friend class VectorLayer
Definition Node.h:718
friend class FillLayer
Definition Node.h:717
friend class TransformMask
Definition Node.h:722
friend class CloneLayer
Definition Node.h:724
friend class GroupLayer
Definition Node.h:714
friend class ColorizeMask
Definition Node.h:723

References CloneLayer, ColorizeMask, KisSharedPtr< T >::data(), FileLayer, FillLayer, FilterLayer, FilterMask, GroupLayer, image(), KisSharedPtr< T >::isNull(), node(), Node(), SelectionMask, TransformMask, TransparencyMask, and VectorLayer.

◆ cropNode

void Node::cropNode ( int x,
int y,
int w,
int h )
slot

cropNode crop this layer.

Parameters
xthe left edge of the cropping rectangle.
ythe top edge of the cropping rectangle
wthe right edge of the cropping rectangle
hthe bottom edge of the cropping rectangle

Definition at line 727 of file Node.cpp.

728{
729 if (!d->node) return;
730 if (!qobject_cast<KisLayer*>(d->node.data())) return;
731 if (!d->node->parent()) return;
732
733 QRect rect = QRect(x, y, w, h);
734 d->image->cropNode(d->node, rect);
735 d->image->waitForDone();
736}
void cropNode(KisNodeSP node, const QRect &newRect, const bool activeFrameOnly=false)
start asynchronous operation on cropping a subtree of nodes starting at node
KisNodeWSP parent
Definition kis_node.cpp:86

References KisImage::cropNode(), d, KisSharedPtr< T >::data(), Node::Private::image, Node::Private::node, KisNode::parent, and KisImage::waitForDone().

◆ duplicate

Node * Node::duplicate ( )
slot

duplicate returns a full copy of the current node. The node is not inserted in the graphic

Returns
a valid Node object or 0 if the node couldn't be duplicated.

Definition at line 648 of file Node.cpp.

649{
650 if (!d->node) return 0;
651 return Node::createNode(d->image, d->node->clone());
652}

References KisNode::clone(), createNode(), d, Node::Private::image, and Node::Private::node.

◆ enableAnimation

void Node::enableAnimation ( ) const
slot

enableAnimation make the current layer animated, so it can have frames.

Definition at line 368 of file Node.cpp.

369{
370 if (!d->node) return;
372}
void enableAnimation()

References d, KisBaseNode::enableAnimation(), and Node::Private::node.

◆ findChildNodes

QList< Node * > Node::findChildNodes ( const QString & name = QString(),
bool recursive = false,
bool partialMatch = false,
const QString & type = QString(),
int colorLabelIndex = 0 ) const
slot

findChildNodes

Parameters
namename of the child node to search for. Leaving this blank will return all nodes.
recursivewhether or not to search recursively. Defaults to false.
partialMatchreturn if the name partially contains the string (case insensitive). Defaults to false.
typefilter returned nodes based on type
colorLabelIndexfilter returned nodes based on color label index
Returns
returns a list of child nodes and grand child nodes of the current node that match the search criteria.

Definition at line 229 of file Node.cpp.

230{
231 if (!d->node) return {};
232
233 QList<Node*> nodes;
234 KisNodeList nodeList = KisLayerUtils::findNodesByName(d->node, name, recursive, partialMatch);
235
236 if (!type.isEmpty()) {
237 for (int i = nodeList.size() - 1; i >= 0; i--) {
238 if ((type == "paintlayer" && !qobject_cast<const KisPaintLayer*>(nodeList.at(i))) ||
239 (type == "vectorlayer" && !qobject_cast<const KisShapeLayer*>(nodeList.at(i))) ||
240 (type == "grouplayer" && !qobject_cast<const KisGroupLayer*>(nodeList.at(i))) ||
241 (type == "filelayer" && !qobject_cast<const KisFileLayer*>(nodeList.at(i))) ||
242 (type == "filterlayer" && !qobject_cast<const KisAdjustmentLayer*>(nodeList.at(i))) ||
243 (type == "filllayer" && !qobject_cast<const KisGeneratorLayer*>(nodeList.at(i))) ||
244 (type == "clonelayer" && !qobject_cast<const KisCloneLayer*>(nodeList.at(i))) ||
245 (type == "transformmask" && !qobject_cast<const KisTransformMask*>(nodeList.at(i))) ||
246 (type == "referenceimageslayer" && !qobject_cast<const KisReferenceImagesLayer*>(nodeList.at(i))) ||
247 (type == "transparencymask" && !qobject_cast<const KisTransformMask*>(nodeList.at(i))) ||
248 (type == "filtermask" && !qobject_cast<const KisFilterMask*>(nodeList.at(i))) ||
249 (type == "selectionmask" && !qobject_cast<const KisSelectionMask*>(nodeList.at(i))) ||
250 (type == "colorizemask" && !qobject_cast<const KisColorizeMask*>(nodeList.at(i)))
251 ) {
252 nodeList.removeAt(i);
253 }
254 }
255 }
256
257 if (colorLabelIndex > 0) {
258 for (int i = nodeList.size() - 1; i >= 0; i--) {
259 if (nodeList.at(i)->colorLabelIndex() != colorLabelIndex) {
260 nodeList.removeAt(i);
261 }
262 }
263 }
264
265 return LibKisUtils::createNodeList(nodeList, d->image);
266}
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:464
QString name() const
Definition Node.cpp:429
QList< KisNodeSP > findNodesByName(KisNodeSP root, const QString &name, bool recursive, bool partialMatch)

References LibKisUtils::createNodeList(), d, KisLayerUtils::findNodesByName(), Node::Private::image, name(), Node::Private::node, and type().

◆ hasExtents

bool Node::hasExtents ( )
slot

does the node have any content in it?

Returns
if node has any content in it

Definition at line 424 of file Node.cpp.

425{
426 return !d->node->extent().isEmpty();
427}
virtual QRect extent() const

References d, KisBaseNode::extent(), and Node::Private::node.

◆ hasKeyframeAtTime

bool Node::hasKeyframeAtTime ( int frameNumber)
slot

Check to see if frame number on layer is a keyframe

Definition at line 524 of file Node.cpp.

525{
526 if (!d->node || !d->node->isAnimated()) return false;
527
529 if (!rkc) return false;
530
531 KisKeyframeSP currentKeyframe = rkc->keyframeAt(frameNumber);
532
533 if (!currentKeyframe) {
534 return false;
535 }
536
537 return true;
538}
static const KoID Raster
KisKeyframeSP keyframeAt(int time) const
Get a keyframe at specified time. Used primarily when the value of a given keyframe is needed.
The KisRasterKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisRas...
KisKeyframeChannel * getKeyframeChannel(const QString &id, bool create)

References d, KisBaseNode::getKeyframeChannel(), KisBaseNode::isAnimated(), KisKeyframeChannel::keyframeAt(), Node::Private::node, and KisKeyframeChannel::Raster.

◆ icon

QIcon Node::icon ( ) const
slot

icon

Returns
the icon associated with the layer.

Definition at line 509 of file Node.cpp.

510{
511 QIcon icon;
512 if (d->node) {
513 icon = d->node->icon();
514 }
515 return icon;
516}
QIcon icon() const
icon
Definition Node.cpp:509
virtual QIcon icon() const

References d, KisBaseNode::icon(), icon(), and Node::Private::node.

◆ image()

KisImageSP Node::image ( ) const
private

Definition at line 823 of file Node.cpp.

824{
825 return d->image;
826}

References d, and Node::Private::image.

◆ index

int Node::index ( ) const
slot

index the index of the node inside the parent

Returns
an integer representing the node's index inside the parent

Definition at line 804 of file Node.cpp.

805{
806 if (!d->node) return -1;
807 if (!d->node->parent()) return -1;
808
809 return d->node->parent()->index(d->node);
810}
int index(const KisNodeSP node) const
Definition kis_node.cpp:432

References d, KisNode::index(), Node::Private::node, and KisNode::parent.

◆ inheritAlpha

bool Node::inheritAlpha ( ) const
slot

inheritAlpha checks whether this node has the inherits alpha flag set

Returns
true if the Inherit Alpha is set

Definition at line 398 of file Node.cpp.

399{
400 if (!d->node) return false;
401 if (!d->node->inherits("KisLayer")) return false;
402 return qobject_cast<const KisLayer*>(d->node)->alphaChannelDisabled();
403}

References d, and Node::Private::node.

◆ isPinnedToTimeline

bool Node::isPinnedToTimeline ( ) const
slot
Returns
Returns true if node is pinned to the Timeline Docker or false if it is not.

Definition at line 380 of file Node.cpp.

381{
382 if (!d->node) return false;
383 return d->node->isPinnedToTimeline();
384}
bool isPinnedToTimeline() const

References d, KisBaseNode::isPinnedToTimeline(), and Node::Private::node.

◆ layerStyleToAsl

QString Node::layerStyleToAsl ( )
slot

layerStyleToAsl retrieve the current layer's style in ASL format.

Returns
a QString in ASL format representing the layer style.

Definition at line 754 of file Node.cpp.

755{
756 if (!d->node) return QString();
757
758 KisLayer *layer = qobject_cast<KisLayer*>(d->node.data());
759
760 if (!layer) return QString();
761
762 KisPSDLayerStyleSP layerStyle = layer->layerStyle();
763
764 if (!layerStyle) return QString();
765
767
768 serializer.setStyles(QVector<KisPSDLayerStyleSP>() << layerStyle);
769
770 return serializer.formPsdXmlDocument().toString();
771}
void setStyles(const QVector< KisPSDLayerStyleSP > &styles)
KisPSDLayerStyleSP layerStyle
Definition kis_layer.cc:171

References d, KisSharedPtr< T >::data(), KisAslLayerStyleSerializer::formPsdXmlDocument(), KisLayer::layerStyle, Node::Private::node, and KisAslLayerStyleSerializer::setStyles().

◆ locked

bool Node::locked ( ) const
slot

locked checks whether the Node is locked. A locked node cannot be changed.

Returns
true if the Node is locked, false if it hasn't been locked.

Definition at line 412 of file Node.cpp.

413{
414 if (!d->node) return false;
415 return d->node->userLocked();
416}
bool userLocked() const

References d, Node::Private::node, and KisBaseNode::userLocked().

◆ mergeDown

Node * Node::mergeDown ( )
slot

mergeDown merges the given node with the first visible node underneath this node in the layerstack. This will drop all per-layer metadata.

Definition at line 686 of file Node.cpp.

687{
688 if (!d->node) return 0;
689 if (!qobject_cast<KisLayer*>(d->node.data())) return 0;
690 if (!d->node->prevSibling()) return 0;
691
692 d->image->mergeDown(qobject_cast<KisLayer*>(d->node.data()), KisMetaData::MergeStrategyRegistry::instance()->get("Drop"));
693 d->image->waitForDone();
694
696}
void mergeDown(KisLayerSP l, const KisMetaData::MergeStrategy *strategy)
T get(const QString &id) const
KisNodeSP prevSibling() const
Definition kis_node.cpp:402

References createNode(), d, KisSharedPtr< T >::data(), KoGenericRegistry< T >::get(), Node::Private::image, KisMetaData::MergeStrategyRegistry::instance(), KisImage::mergeDown(), Node::Private::node, KisNode::prevSibling(), and KisImage::waitForDone().

◆ move

void Node::move ( int x,
int y )
slot

move the pixels to the given x, y location in the image coordinate space.

Definition at line 622 of file Node.cpp.

623{
624 if (!d->node) return;
625 d->node->setX(x);
626 d->node->setY(y);
627}
virtual void setX(qint32)
virtual void setY(qint32)

References d, Node::Private::node, KisBaseNode::setX(), and KisBaseNode::setY().

◆ name

QString Node::name ( ) const
slot
Returns
the user-visible name of this node.

Definition at line 429 of file Node.cpp.

430{
431 if (!d->node) return QString();
432 return d->node->name();
433}
QString name() const

References d, KisBaseNode::name(), and Node::Private::node.

◆ node()

KisNodeSP Node::node ( ) const
private

Definition at line 828 of file Node.cpp.

829{
830 return d->node;
831}

References d, and Node::Private::node.

◆ opacity

int Node::opacity ( ) const
slot

return the opacity of the Node. The opacity is a value between 0 and 255.

Definition at line 442 of file Node.cpp.

443{
444 if (!d->node) return 0;
445 return d->node->opacity();
446}
quint8 opacity() const

References d, Node::Private::node, and KisBaseNode::opacity().

◆ operator!=()

bool Node::operator!= ( const Node & other) const

Definition at line 148 of file Node.cpp.

149{
150 return !(operator==(other));
151}
bool operator==(const Node &other) const
Definition Node.cpp:142

References operator==().

◆ operator==()

bool Node::operator== ( const Node & other) const

Definition at line 142 of file Node.cpp.

143{
144 return (d->node == other.d->node
145 && d->image == other.d->image);
146}

References d, Node::Private::image, and Node::Private::node.

◆ paintAbility

QString Node::paintAbility ( )
slot

paintAbility can be used to determine whether this node can be painted on with the current brush preset.

Returns
QString, one of the following:
  • VECTOR - This node is vector-based.
  • CLONE - This node is a Clone Layer.
  • PAINT - This node is paintable by the current brush preset.
  • UNPAINTABLE - This node is not paintable, or a null preset is somehow selected./li>
  • MYPAINTBRUSH_UNPAINTABLE - This node's non-RGBA colorspace cannot be painted on by the currently selected MyPaint brush.

Definition at line 833 of file Node.cpp.

834{
835 // Taken from KisTool:nodePaintAbility().
837 KisCanvas2 *canvas = mainWindow->activeView()->canvasBase();
838 if (canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).isNull()) {
839 return "UNPAINTABLE";
840 }
841
842 if (!d->node) {
843 return "UNPAINTABLE";
844 }
845
846 if (d->node->inherits("KisShapeLayer")) {
847 return "VECTOR";
848 }
849 if (d->node->inherits("KisCloneLayer")) {
850 return "CLONE";
851 }
852 if (d->node->paintDevice()) {
853
854 KisPaintOpPresetSP currentPaintOpPreset = canvas->resourceManager()->resource(KoCanvasResource::CurrentPaintOpPreset).value<KisPaintOpPresetSP>();
855 if (currentPaintOpPreset->paintOp().id() == "mypaintbrush") {
856 const KoColorSpace *colorSpace = d->node->paintDevice()->colorSpace();
857 if (colorSpace->colorModelId() != RGBAColorModelID) {
858 return "MYPAINTBRUSH_UNPAINTABLE";
859 }
860 }
861
862 return "PAINT";
863 }
864
865 return "UNPAINTABLE";
866}
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
Main window for Krita.
QPointer< KisView > activeView
static KisPart * instance()
Definition KisPart.cpp:130
KisMainWindow * currentMainwindow() const
Definition KisPart.cpp:457
QPointer< KoCanvasResourceProvider > resourceManager
virtual KisPaintDeviceSP paintDevice() const =0

References KisMainWindow::activeView, KoColorSpace::colorModelId(), KisPaintDevice::colorSpace(), KisPart::currentMainwindow(), KoCanvasResource::CurrentPaintOpPreset, d, KisPart::instance(), Node::Private::node, KisBaseNode::paintDevice(), KoCanvasBase::resourceManager, and RGBAColorModelID.

◆ paintDevice()

KisPaintDeviceSP Node::paintDevice ( ) const
private

paintDevice gives access to the internal paint device of this Node

Returns
the paintdevice or 0 if the node does not have an editable paint device.

Definition at line 818 of file Node.cpp.

819{
820 return d->node->paintDevice();
821}

References d, Node::Private::node, and KisBaseNode::paintDevice().

◆ paintEllipse

void Node::paintEllipse ( const QRectF & rect,
const QString strokeStyle = PaintingResources::defaultStrokeStyle,
const QString fillStyle = PaintingResources::defaultFillStyle )
slot

paint an ellipse on the canvas. Uses current brush preset

Parameters
rectQRect with x, y, width, and height
  • None
  • ForegroundColor
  • BackgroundColor
Default is ForegroundColor.
fillStyleappearance of the fill, one of:
  • None
  • ForegroundColor
  • BackgroundColor
  • Pattern
Default is None.

Definition at line 955 of file Node.cpp.

956{
957 if (paintAbility() != "PAINT") {
958 dbgScript << "Script attempted to use Node::paintEllipse() on an unpaintable node, ignoring.";
959 return;
960 }
961
962 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, node(), strokeStyle, fillStyle);
963 helper.paintEllipse(rect);
964}
QString paintAbility()
paintAbility can be used to determine whether this node can be painted on with the current brush pres...
Definition Node.cpp:833
#define dbgScript
Definition kis_debug.h:60
KisFigurePaintingToolHelper createHelper(KisImageWSP image, KisNodeSP node, const QString strokeStyle=defaultStrokeStyle, const QString fillStyle=defaultFillStyle)

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), and KisFigurePaintingToolHelper::paintEllipse().

◆ paintLine

void Node::paintLine ( const QPointF pointOne,
const QPointF pointTwo,
double pressureOne = 1.0,
double pressureTwo = 1.0,
const QString strokeStyle = PaintingResources::defaultStrokeStyle )
slot

paint a line on the canvas. Uses current brush preset

Parameters
pointOnestarting point
pointTwoend point
pressureOnestarting pressure
pressureTwoend pressure
strokeStyleappearance of the outline, one of:
  • None - will use Foreground Color, since line would be invisible otherwise
  • ForegroundColor
  • BackgroundColor

Definition at line 868 of file Node.cpp.

869{
870 if (paintAbility() != "PAINT") {
871 dbgScript << "Script attempted to use Node::paintLine() on an unpaintable node, ignoring.";
872 return;
873 }
874
875 KisPaintInformation pointOneInfo;
876 pointOneInfo.setPressure(pressureOne);
877 pointOneInfo.setPos(pointOne);
878
879 KisPaintInformation pointTwoInfo;
880 pointTwoInfo.setPressure(pressureTwo);
881 pointTwoInfo.setPos(pointTwo);
882
884 helper.paintLine(pointOneInfo, pointTwoInfo);
885}
void paintLine(const KisPaintInformation &pi0, const KisPaintInformation &pi1)
void setPos(const QPointF &p)
void setPressure(qreal p)
Set the pressure.

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), KisFigurePaintingToolHelper::paintLine(), KisPaintInformation::setPos(), and KisPaintInformation::setPressure().

◆ paintPath

void Node::paintPath ( const QPainterPath & path,
const QString strokeStyle = PaintingResources::defaultStrokeStyle,
const QString fillStyle = PaintingResources::defaultFillStyle )
slot

paint a custom path on the canvas. Uses current brush preset

Parameters
pathQPainterPath to determine path
  • None
  • ForegroundColor
  • BackgroundColor
Default is ForegroundColor.
fillStyleappearance of the fill, one of:
  • None
  • ForegroundColor
  • BackgroundColor
  • Pattern
Default is None.

Definition at line 967 of file Node.cpp.

968{
969 if (paintAbility() != "PAINT") {
970 dbgScript << "Script attempted to use Node::paintPath() on an unpaintable node, ignoring.";
971 return;
972 }
973
974 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, node(), strokeStyle, fillStyle);
975 helper.paintPainterPath(path);
976}
void paintPainterPath(const QPainterPath &path)

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), and KisFigurePaintingToolHelper::paintPainterPath().

◆ paintPolygon

void Node::paintPolygon ( const QList< QPointF > points,
const QString strokeStyle = PaintingResources::defaultStrokeStyle,
const QString fillStyle = PaintingResources::defaultFillStyle )
slot

paint a polygon on the canvas. Uses current brush preset

Parameters
listof Qpoints
  • None
  • ForegroundColor
  • BackgroundColor
Default is ForegroundColor.
fillStyleappearance of the fill, one of:
  • None
  • ForegroundColor
  • BackgroundColor
  • Pattern
Default is None.

Definition at line 941 of file Node.cpp.

942{
943 if (paintAbility() != "PAINT") {
944 dbgScript << "Script attempted to use Node::paintPolygon() on an unpaintable node, ignoring.";
945 return;
946 }
947
948 // strategy needs points in vPointF format
949 QVector<QPointF> points = points.fromList(listPoint);
950 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, node(), strokeStyle, fillStyle);
951 helper.paintPolygon(points);
952}

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), and KisFigurePaintingToolHelper::paintPolygon().

◆ paintPolylineStroke

void Node::paintPolylineStroke ( const QList< StrokePoint > & points,
const QString strokeStyle = PaintingResources::defaultStrokeStyle )
slot

paintPolylineStroke paint one continuous brush stroke with complete input information for every supplied point. Uses the current brush preset.

The stroke is submitted as one undoable freehand stroke, so brush spacing, randomness, and distance-based sensors are continuous across all segments. A single point paints one dab.

Parameters
pointsinput samples in image coordinates. Time is elapsed milliseconds from the beginning of the stroke; speed is normalized.
strokeStyleappearance of the outline; see paintLine().

Definition at line 887 of file Node.cpp.

888{
889 if (paintAbility() != "PAINT") {
890 dbgScript << "Script attempted to use Node::paintPolylineStroke() on an unpaintable node, ignoring.";
891 return;
892 }
893
894 if (points.isEmpty()) {
895 return;
896 }
897
898 auto paintInformation = [] (const StrokePoint &point) {
899 return KisPaintInformation(point.position(),
900 point.pressure(),
901 point.xTilt(),
902 point.yTilt(),
903 point.rotation(),
904 point.tangentialPressure(),
905 1.0,
906 point.time(),
907 point.speed());
908 };
909
911
912 KisPaintInformation previous = paintInformation(points.first());
913 if (points.size() == 1) {
914 helper.paintLine(previous, previous);
915 return;
916 }
917
918 for (auto it = std::next(points.cbegin()); it != points.cend(); ++it) {
919 KisPaintInformation current = paintInformation(*it);
920 helper.paintLine(previous, current);
921 previous = current;
922 }
923}

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), and KisFigurePaintingToolHelper::paintLine().

◆ paintRectangle

void Node::paintRectangle ( const QRectF & rect,
const QString strokeStyle = PaintingResources::defaultStrokeStyle,
const QString fillStyle = PaintingResources::defaultFillStyle )
slot

paint a rectangle on the canvas. Uses current brush preset

Parameters
rectQRect with x, y, width, and height
strokeStyleappearance of the outline, one of:
  • None
  • ForegroundColor
  • BackgroundColor
Default is ForegroundColor.
fillStyleappearance of the fill, one of:
  • None
  • ForegroundColor
  • BackgroundColor
  • Pattern
Default is None.

Definition at line 926 of file Node.cpp.

927{
928 if (paintAbility() != "PAINT") {
929 dbgScript << "Script attempted to use Node::paintRectangle() on an unpaintable node, ignoring.";
930 return;
931 }
932
933 // reference class where this stuff is being done. Maybe can use the "facade" like that does for setup?
934 // void KisFigurePaintingToolHelper::paintRect(const QRectF &rect)
935
936 KisFigurePaintingToolHelper helper = PaintingResources::createHelper(d->image, node(), strokeStyle, fillStyle);
937 helper.paintRect(rect);
938}

References PaintingResources::createHelper(), d, dbgScript, Node::Private::image, node(), paintAbility(), and KisFigurePaintingToolHelper::paintRect().

◆ parentNode

Node * Node::parentNode ( ) const
slot

return the Node that is the parent of the current Node, or 0 if this is the root Node.

Definition at line 457 of file Node.cpp.

458{
459 if (!d->node) return 0;
460 if (!d->node->parent()) return 0;
461 return Node::createNode(d->image, d->node->parent());
462}

References createNode(), d, Node::Private::image, Node::Private::node, and KisNode::parent.

◆ pixelData

QByteArray Node::pixelData ( int x,
int y,
int w,
int h ) const
slot

pixelData reads the given rectangle from the Node's paintable pixels, if those exist, and returns it as a byte array. The pixel data starts top-left, and is ordered row-first.

The byte array can be interpreted as follows: 8 bits images have one byte per channel, and as many bytes as there are channels. 16 bits integer images have two bytes per channel, representing an unsigned short. 16 bits float images have two bytes per channel, representing a half, or 16 bits float. 32 bits float images have four bytes per channel, representing a float.

You can read outside the node boundaries; those pixels will be transparent black.

The order of channels is:

  • Integer RGBA: Blue, Green, Red, Alpha
  • Float RGBA: Red, Green, Blue, Alpha
  • GrayA: Gray, Alpha
  • Selection: selectedness
  • LabA: L, a, b, Alpha
  • CMYKA: Cyan, Magenta, Yellow, Key, Alpha
  • XYZA: X, Y, Z, A
  • YCbCrA: Y, Cb, Cr, Alpha

The byte array is a copy of the original node data. In Python, you can use bytes, bytearray and the struct module to interpret the data and construct, for instance, a Pillow Image object.

If you read the pixeldata of a mask, a filter or generator layer, you get the selection bytes, which is one channel with values in the range from 0..255.

If you want to change the pixels of a node you can write the pixels back after manipulation with setPixelData(). This will only succeed on nodes with writable pixel data, e.g not on groups or file layers.

Parameters
xx position from where to start reading
yy position from where to start reading
wrow length to read
hnumber of rows to read
Returns
a QByteArray with the pixel data. The byte array may be empty.

Definition at line 547 of file Node.cpp.

548{
549 QByteArray ba;
550
551 if (!d->node) return ba;
552
554 if (!dev) return ba;
555
556 ba.resize(w * h * dev->pixelSize());
557 dev->readBytes(reinterpret_cast<quint8*>(ba.data()), x, y, w, h);
558 return ba;
559}
quint32 pixelSize() const
void readBytes(quint8 *data, qint32 x, qint32 y, qint32 w, qint32 h) const

References d, Node::Private::node, KisBaseNode::paintDevice(), KisPaintDevice::pixelSize(), and KisPaintDevice::readBytes().

◆ pixelDataAtTime

QByteArray Node::pixelDataAtTime ( int x,
int y,
int w,
int h,
int time ) const
slot

pixelDataAtTime a basic function to get pixeldata from an animated node at a given time.

Parameters
xthe position from the left to start reading.
ythe position from the top to start reader
wthe row length to read
hthe number of rows to read
timethe frame number
Returns
a QByteArray with the pixel data. The byte array may be empty.

Definition at line 561 of file Node.cpp.

562{
563 QByteArray ba;
564
565 if (!d->node || !d->node->isAnimated()) return ba;
566
567 //
569 if (!rkc) return ba;
571 if (!frame) return ba;
573 if (!dev) return ba;
574
575 frame->writeFrameToDevice(dev);
576
577 ba.resize(w * h * dev->pixelSize());
578 dev->readBytes(reinterpret_cast<quint8*>(ba.data()), x, y, w, h);
579 return ba;
580}
The KisRasterKeyframe class is a concrete subclass of KisKeyframe that wraps a physical raster image ...

References KritaUtils::CopySnapshot, d, KisBaseNode::getKeyframeChannel(), KisBaseNode::isAnimated(), KisKeyframeChannel::keyframeAt(), Node::Private::node, KisBaseNode::paintDevice(), KisPaintDevice::pixelSize(), KisKeyframeChannel::Raster, and KisPaintDevice::readBytes().

◆ position

QPoint Node::position ( ) const
slot

position returns the position of the paint device of this node. The position is always 0,0 unless the layer has been moved. If you want to know the topleft position of the rectangle around the actual non-transparent pixels in the node, use bounds().

Returns
the top-left position of the node

Definition at line 629 of file Node.cpp.

630{
631 if (!d->node) return QPoint();
632 return QPoint(d->node->x(), d->node->y());
633}
virtual qint32 y() const
virtual qint32 x() const

References d, Node::Private::node, KisBaseNode::x(), and KisBaseNode::y().

◆ projectionPixelData

QByteArray Node::projectionPixelData ( int x,
int y,
int w,
int h ) const
slot

projectionPixelData reads the given rectangle from the Node's projection (that is, what the node looks like after all sub-Nodes (like layers in a group or masks on a layer) have been applied, and returns it as a byte array. The pixel data starts top-left, and is ordered row-first.

The byte array can be interpreted as follows: 8 bits images have one byte per channel, and as many bytes as there are channels. 16 bits integer images have two bytes per channel, representing an unsigned short. 16 bits float images have two bytes per channel, representing a half, or 16 bits float. 32 bits float images have four bytes per channel, representing a float.

You can read outside the node boundaries; those pixels will be transparent black.

The order of channels is:

  • Integer RGBA: Blue, Green, Red, Alpha
  • Float RGBA: Red, Green, Blue, Alpha
  • GrayA: Gray, Alpha
  • Selection: selectedness
  • LabA: L, a, b, Alpha
  • CMYKA: Cyan, Magenta, Yellow, Key, Alpha
  • XYZA: X, Y, Z, A
  • YCbCrA: Y, Cb, Cr, Alpha

The byte array is a copy of the original node data. In Python, you can use bytes, bytearray and the struct module to interpret the data and construct, for instance, a Pillow Image object.

If you read the projection of a mask, you get the selection bytes, which is one channel with values in the range from 0..255.

If you want to change the pixels of a node you can write the pixels back after manipulation with setPixelData(). This will only succeed on nodes with writable pixel data, e.g not on groups or file layers.

Parameters
xx position from where to start reading
yy position from where to start reading
wrow length to read
hnumber of rows to read
Returns
a QByteArray with the pixel data. The byte array may be empty.

Definition at line 583 of file Node.cpp.

584{
585 QByteArray ba;
586
587 if (!d->node) return ba;
588
590 if (const KisColorizeMask *mask = qobject_cast<const KisColorizeMask*>(d->node)) {
591
592 dev = mask->coloringProjection();
593 } else {
594 dev = d->node->projection();
595 }
596 if (!dev) return ba;
597
598 ba.resize(w * h * dev->pixelSize());
599 dev->readBytes(reinterpret_cast<quint8*>(ba.data()), x, y, w, h);
600 return ba;
601}

References d, Node::Private::node, KisPaintDevice::pixelSize(), KisBaseNode::projection(), and KisPaintDevice::readBytes().

◆ remove

bool Node::remove ( )
slot

remove removes this node from its parent image.

Definition at line 635 of file Node.cpp.

636{
637 if (!d->node) return false;
638 if (!d->node->parent()) return false;
639
641
643 d->image->waitForDone();
644
645 return true;
646}

References d, Node::Private::image, Node::Private::node, KisNode::parent, KisProcessingApplicator::runSingleCommandStroke(), and KisImage::waitForDone().

◆ removeChildNode

bool Node::removeChildNode ( Node * child)
slot

removeChildNode removes the given node from the list of children.

Parameters
childthe node to be removed

Definition at line 286 of file Node.cpp.

287{
288 if (!d->node) return false;
289 return child->remove();
290}
bool remove()
remove removes this node from its parent image.
Definition Node.cpp:635

References d, Node::Private::node, and remove().

◆ rotateNode

void Node::rotateNode ( double radians)
slot

rotateNode rotate this layer by the given radians.

Parameters
radiansamount the layer should be rotated in, in radians.

Definition at line 717 of file Node.cpp.

718{
719 if (!d->node) return;
720 if (!qobject_cast<KisLayer*>(d->node.data())) return;
721 if (!d->node->parent()) return;
722
723 d->image->rotateNode(d->node, radians, 0);
724 d->image->waitForDone();
725}
void rotateNode(KisNodeSP node, double radians, KisSelectionSP selection)
start asynchronous operation on rotating a subtree of nodes starting at node

References d, KisSharedPtr< T >::data(), Node::Private::image, Node::Private::node, KisNode::parent, KisImage::rotateNode(), and KisImage::waitForDone().

◆ save

bool Node::save ( const QString & filename,
double xRes,
double yRes,
const InfoObject & exportConfiguration,
const QRect & exportRect = QRect() )
slot

save exports the given node with this filename. The extension of the filename determines the filetype.

Parameters
filenamethe filename including extension
xResthe horizontal resolution in pixels per pt (there are 72 pts in an inch)
yResthe horizontal resolution in pixels per pt (there are 72 pts in an inch)
exportConfigurationa configuration object appropriate to the file format.
exportRectthe export bounds for saving a node as a QRect If exportRect is empty, then save exactBounds() of the node. If you'd like to save the image- aligned area of the node, just pass image->bounds() there. See Document->exportImage for InfoObject details.
Returns
true if saving succeeded, false if it failed.

Definition at line 654 of file Node.cpp.

655{
656 if (!d->node) return false;
657 if (filename.isEmpty()) return false;
658
659 KisPaintDeviceSP projection = d->node->projection();
660 QRect bounds = (exportRect.isEmpty())? d->node->exactBounds() : exportRect;
661
662 QString mimeType = KisMimeDatabase::mimeTypeForFile(filename, false);
663 QScopedPointer<KisDocument> doc(KisPart::instance()->createDocument());
664
665 KisImageSP dst = new KisImage(doc->createUndoStore(),
666 bounds.right(),
667 bounds.bottom(),
668 projection->compositionSourceColorSpace(),
669 d->node->name());
670 dst->setResolution(xRes, yRes);
671 doc->setFileBatchMode(Krita::instance()->batchmode());
672 doc->setCurrentImage(dst);
673 KisPaintLayer* paintLayer = new KisPaintLayer(dst, "paint device", d->node->opacity());
674 paintLayer->paintDevice()->makeCloneFrom(projection, bounds);
675 dst->addNode(paintLayer, dst->rootLayer(), KisLayerSP(0));
676 dst->cropImage(bounds);
677 dst->initialRefreshGraph();
678
679 bool r = doc->exportDocumentSync(filename, mimeType.toLatin1(), exportConfiguration.configuration());
680 if (!r) {
681 qWarning() << doc->errorMessage();
682 }
683 return r;
684}
KisPropertiesConfigurationSP configuration() const
configuration gives access to the internal configuration object. Must be used internally in libkis
KisGroupLayerSP rootLayer() const
void cropImage(const QRect &newRect)
start asynchronous operation on cropping the image
Definition kis_image.cc:896
void initialRefreshGraph()
void setResolution(double xres, double yres)
static QString mimeTypeForFile(const QString &file, bool checkExistingFiles=true)
Find the mimetype for the given filename. The filename must include a suffix.
virtual const KoColorSpace * compositionSourceColorSpace() const
void makeCloneFrom(KisPaintDeviceSP src, const QRect &rect)
static Krita * instance()
instance retrieve the singleton instance of the Application object.
Definition Krita.cpp:396
#define bounds(x, a, b)
bool addNode(KisNodeSP node, KisNodeSP parent=KisNodeSP(), KisNodeAdditionFlags flags=KisNodeAdditionFlag::None)
KisPaintDeviceSP paintDevice

References KisNodeFacade::addNode(), bounds, KisPaintDevice::compositionSourceColorSpace(), InfoObject::configuration(), KisImage::cropImage(), d, KisBaseNode::exactBounds(), KisImage::initialRefreshGraph(), Krita::instance(), KisPart::instance(), KisPaintDevice::makeCloneFrom(), KisMimeDatabase::mimeTypeForFile(), KisBaseNode::name(), Node::Private::node, KisBaseNode::opacity(), KisPaintLayer::paintDevice, KisBaseNode::projection(), KisImage::rootLayer(), and KisImage::setResolution().

◆ scaleNode

void Node::scaleNode ( QPointF origin,
int width,
int height,
QString strategy )
slot

scaleNode

Parameters
originthe origin point
widththe width
heightthe height
strategythe scaling strategy. There's several ones amongst these that aren't available in the regular UI.
  • Hermite
  • Bicubic - Adds pixels using the color of surrounding pixels. Produces smoother tonal gradations than Bilinear.
  • Box - Replicate pixels in the image. Preserves all the original detail, but can produce jagged effects.
  • Bilinear - Adds pixels averaging the color values of surrounding pixels. Produces medium quality results when the image is scaled from half to two times the original size.
  • Bell
  • BSpline
  • Lanczos3 - Offers similar results than Bicubic, but maybe a little bit sharper. Can produce light and dark halos along strong edges.
  • Mitchell

Definition at line 698 of file Node.cpp.

699{
700 if (!d->node) return;
701 if (!qobject_cast<KisLayer*>(d->node.data())) return;
702 if (!d->node->parent()) return;
703
704 KisFilterStrategy *actualStrategy = KisFilterStrategyRegistry::instance()->get(strategy);
705 if (!actualStrategy) actualStrategy = KisFilterStrategyRegistry::instance()->get("Bicubic");
706
707 const QRect bounds(d->node->exactBounds());
708
710 origin,
711 qreal(width) / bounds.width(),
712 qreal(height) / bounds.height(),
713 actualStrategy, 0);
714 d->image->waitForDone();
715}
static KisFilterStrategyRegistry * instance()
void scaleNode(KisNodeSP node, const QPointF &center, qreal scaleX, qreal scaleY, KisFilterStrategy *filterStrategy, KisSelectionSP selection)
start asynchronous operation on scaling a subtree of nodes starting at node

References bounds, d, KisSharedPtr< T >::data(), KisBaseNode::exactBounds(), KoGenericRegistry< T >::get(), Node::Private::image, KisFilterStrategyRegistry::instance(), Node::Private::node, KisNode::parent, KisImage::scaleNode(), and KisImage::waitForDone().

◆ setAlphaLocked

void Node::setAlphaLocked ( bool value)
slot

setAlphaLocked set the layer to value if the node is paint layer.

Definition at line 171 of file Node.cpp.

172{
173 if (!d->node) return;
174 KisPaintLayerSP paintLayer = qobject_cast<KisPaintLayer*>(d->node.data());
175 if (paintLayer) {
176 paintLayer->setAlphaLocked(value);
177 }
178}
float value(const T *src, size_t ch)
void setAlphaLocked(bool lock)

References d, KisSharedPtr< T >::data(), Node::Private::node, KisPaintLayer::setAlphaLocked(), and value().

◆ setBlendingMode

void Node::setBlendingMode ( QString value)
slot

setBlendingMode set the blending mode of the node to the given value

Parameters
valueone of the string values from
See also
KoCompositeOpRegistry.h

Definition at line 188 of file Node.cpp.

189{
190 if (!d->node) return;
191
193 value);
194
196 d->image->waitForDone();
197}
The command for setting the composite op.

References d, Node::Private::image, Node::Private::node, KisProcessingApplicator::runSingleCommandStroke(), value(), and KisImage::waitForDone().

◆ setChildNodes

void Node::setChildNodes ( QList< Node * > nodes)
slot

setChildNodes this replaces the existing set of child nodes with the new set.

Parameters
nodesThe list of nodes that will become children, bottom-up – the first node, is the bottom-most node in the stack.

Definition at line 292 of file Node.cpp.

293{
294 if (!d->node) return;
295 while (d->node->firstChild()) {
297 }
298 Q_FOREACH(Node *node, nodes) {
299 d->image->addNode(node->node(), d->node);
300 }
301}
bool removeNode(KisNodeSP node)
KisNodeSP firstChild() const
Definition kis_node.cpp:361

References KisNodeFacade::addNode(), d, KisNode::firstChild(), Node::Private::image, Node::Private::node, node(), and KisNodeFacade::removeNode().

◆ setCollapsed

void Node::setCollapsed ( bool collapsed)
slot

Sets the state of the node to the value of

Parameters
collapsed

Definition at line 392 of file Node.cpp.

393{
394 if (!d->node) return;
396}
bool collapsed() const
Definition Node.cpp:386
void setCollapsed(bool collapsed)

References collapsed(), d, Node::Private::node, and KisBaseNode::setCollapsed().

◆ setColorLabel

void Node::setColorLabel ( int index)
slot

setColorLabel sets a color label index associated to the layer. The actual color of the label and the number of available colors is defined by Krita GUI configuration.

Parameters
indexan integer corresponding to the set of available color labels.

Definition at line 309 of file Node.cpp.

310{
311 if (!d->node) return;
313}
int index() const
index the index of the node inside the parent
Definition Node.cpp:804
void setColorLabelIndex(int index)

References d, index(), Node::Private::node, and KisBaseNode::setColorLabelIndex().

◆ setColorProfile

bool Node::setColorProfile ( const QString & colorProfile)
slot

setColorProfile set the color profile of the image to the given profile. The profile has to be registered with krita and be compatible with the current color model and depth; the image data is not converted.

Parameters
colorProfile
Returns
if assigning the color profile worked

Definition at line 337 of file Node.cpp.

338{
339 if (!d->node) return false;
340 if (!d->node->inherits("KisLayer")) return false;
341 KisLayer *layer = qobject_cast<KisLayer*>(d->node.data());
343 bool result = d->image->assignLayerProfile(layer, profile);
344 d->image->waitForDone();
345 return result;
346}
bool assignLayerProfile(KisNodeSP node, const KoColorProfile *profile)
QString colorProfile() const
Definition Node.cpp:330
const KoColorProfile * profileByName(const QString &name) const
static KoColorSpaceRegistry * instance()

References KisImage::assignLayerProfile(), colorProfile(), d, KisSharedPtr< T >::data(), Node::Private::image, KoColorSpaceRegistry::instance(), Node::Private::node, KoColorSpaceRegistry::profileByName(), and KisImage::waitForDone().

◆ setColorSpace

bool Node::setColorSpace ( const QString & colorModel,
const QString & colorDepth,
const QString & colorProfile )
slot

setColorSpace convert the node to the given colorspace

Parameters
colorModelA string describing the color model of the node:
  • A: Alpha mask
  • RGBA: RGB with alpha channel (The actual order of channels is most often BGR!)
  • XYZA: XYZ with alpha channel
  • LABA: LAB with alpha channel
  • CMYKA: CMYK with alpha channel
  • GRAYA: Gray with alpha channel
  • YCbCrA: YCbCr with alpha channel
colorDepthA string describing the color depth of the image:
  • U8: unsigned 8 bits integer, the most common type
  • U16: unsigned 16 bits integer
  • F16: half, 16 bits floating point. Only available if Krita was built with OpenEXR
  • F32: 32 bits floating point
colorProfilea valid color profile for this color model and color depth combination.

Definition at line 348 of file Node.cpp.

349{
350 if (!d->node) return false;
351 if (!d->node->inherits("KisLayer")) return false;
353 if (!profile) return false;
356 profile);
358 d->image->waitForDone();
359 return true;
360}
void convertLayerColorSpace(KisNodeSP node, const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
QString colorDepth() const
Definition Node.cpp:315
QString colorModel() const
colorModel retrieve the current color model of this document:
Definition Node.cpp:322
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)

References colorDepth(), colorModel(), colorProfile(), KoColorSpaceRegistry::colorSpace(), KisImage::convertLayerColorSpace(), d, Node::Private::image, KoColorSpaceRegistry::instance(), KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), Node::Private::node, KoColorSpaceRegistry::profileByName(), and KisImage::waitForDone().

◆ setInheritAlpha

void Node::setInheritAlpha ( bool value)
slot

set the Inherit Alpha flag to the given value

Definition at line 405 of file Node.cpp.

406{
407 if (!d->node) return;
408 if (!d->node->inherits("KisLayer")) return;
409 const_cast<KisLayer*>(qobject_cast<const KisLayer*>(d->node))->disableAlphaChannel(value);
410}

References d, Node::Private::node, and value().

◆ setLayerStyleFromAsl

bool Node::setLayerStyleFromAsl ( const QString & asl)
slot

setLayerStyleFromAsl set a new layer style for this node.

Parameters
aslContenta string formatted in ASL format containing the layer style
Returns
true if layer style was set, false if failed.

Definition at line 773 of file Node.cpp.

774{
775 if (!d->node) return false;
776
777 KisLayer *layer = qobject_cast<KisLayer*>(d->node.data());
778
779 if (!layer) return false;
780
781 QDomDocument aslDoc;
782
783 if (!aslDoc.setContent(asl)) {
784 qWarning() << "ASL string format is invalid!";
785 return false;
786 }
787
789
790 serializer.registerPSDPattern(aslDoc);
791 serializer.readFromPSDXML(aslDoc);
792
793 if (serializer.styles().size() != 1) return false;
794
795 KisPSDLayerStyleSP newStyle = serializer.styles().first();
796 KUndo2Command *cmd = new KisSetLayerStyleCommand(layer, layer->layerStyle(), newStyle);
797
799 d->image->waitForDone();
800
801 return true;
802}
QVector< KisPSDLayerStyleSP > styles() const
void readFromPSDXML(const QDomDocument &doc)
void registerPSDPattern(const QDomDocument &doc)

References d, KisSharedPtr< T >::data(), Node::Private::image, KisLayer::layerStyle, Node::Private::node, KisAslLayerStyleSerializer::readFromPSDXML(), KisAslLayerStyleSerializer::registerPSDPattern(), KisProcessingApplicator::runSingleCommandStroke(), KisAslLayerStyleSerializer::styles(), and KisImage::waitForDone().

◆ setLocked

void Node::setLocked ( bool value)
slot

set the Locked flag to the give value

Definition at line 418 of file Node.cpp.

419{
420 if (!d->node) return;
422}
virtual void setUserLocked(bool l)

References d, Node::Private::node, KisBaseNode::setUserLocked(), and value().

◆ setName

void Node::setName ( QString name)
slot

rename the Node to the given name

Definition at line 435 of file Node.cpp.

436{
437 if (!d->node) return;
438 d->node->setName(name);
439}
void setName(const QString &name)

References d, name(), Node::Private::node, and KisBaseNode::setName().

◆ setOpacity

void Node::setOpacity ( int value)
slot

set the opacity of the Node to the given value. The opacity is a value between 0 and 255.

Definition at line 448 of file Node.cpp.

449{
450 if (!d->node) return;
451 if (value < 0) value = 0;
452 if (value > 255) value = 255;
454}
void setOpacity(quint8 val)

References d, Node::Private::node, KisBaseNode::setOpacity(), and value().

◆ setPinnedToTimeline

void Node::setPinnedToTimeline ( bool pinned) const
slot

Sets whether or not node should be pinned to the Timeline Docker, regardless of selection activity.

Definition at line 374 of file Node.cpp.

375{
376 if (!d->node) return;
377 d->node->setPinnedToTimeline(pinned);
378}
void setPinnedToTimeline(bool pinned)

References d, Node::Private::node, and KisBaseNode::setPinnedToTimeline().

◆ setPixelData

bool Node::setPixelData ( QByteArray value,
int x,
int y,
int w,
int h )
slot

setPixelData writes the given bytes, of which there must be enough, into the Node, if the Node has writable pixel data:

  • paint layer: the layer's original pixels are overwritten
  • filter layer, generator layer, any mask: the embedded selection's pixels are overwritten. Note: for these

File layers, Group layers, Clone layers cannot be written to. Calling setPixelData on those layer types will silently do nothing.

Parameters
valuethe byte array representing the pixels. There must be enough bytes available. Krita will take the raw pointer from the QByteArray and start reading, not stopping before (number of channels * size of channel * w * h) bytes are read.
xthe x position to start writing from
ythe y position to start writing from
wthe width of each row
hthe number of rows to write
Returns
true if writing the pixeldata worked

Definition at line 603 of file Node.cpp.

604{
605 if (!d->node) return false;
607 if (!dev) return false;
608 if (value.length() < w * h * (int)dev->colorSpace()->pixelSize()) {
609 qWarning() << "Node::setPixelData: not enough data to write to the paint device";
610 return false;
611 }
612 dev->writeBytes((const quint8*)value.constData(), x, y, w, h);
613 return true;
614}
void writeBytes(const quint8 *data, qint32 x, qint32 y, qint32 w, qint32 h)
virtual quint32 pixelSize() const =0

References KisPaintDevice::colorSpace(), d, Node::Private::node, KisBaseNode::paintDevice(), KoColorSpace::pixelSize(), value(), and KisPaintDevice::writeBytes().

◆ setVisible

void Node::setVisible ( bool visible)
slot

Set the visibility of the current node to

Parameters
visible

Definition at line 540 of file Node.cpp.

541{
542 if (!d->node) return;
544}
bool visible() const
Definition Node.cpp:518
virtual void setVisible(bool visible, bool loading=false)

References d, Node::Private::node, KisBaseNode::setVisible(), and visible().

◆ shearNode

void Node::shearNode ( double angleX,
double angleY )
slot

shearNode perform a shear operation on this node.

Parameters
angleXthe X-angle in degrees to shear by
angleYthe Y-angle in degrees to shear by

Definition at line 738 of file Node.cpp.

739{
740 if (!d->node) return;
741 if (!qobject_cast<KisLayer*>(d->node.data())) return;
742 if (!d->node->parent()) return;
743
744 d->image->shearNode(d->node, angleX, angleY, 0);
745 d->image->waitForDone();
746}
void shearNode(KisNodeSP node, double angleX, double angleY, KisSelectionSP selection)
start asynchronous operation on shearing a subtree of nodes starting at node

References d, KisSharedPtr< T >::data(), Node::Private::image, Node::Private::node, KisNode::parent, KisImage::shearNode(), and KisImage::waitForDone().

◆ thumbnail

QImage Node::thumbnail ( int w,
int h )
slot

thumbnail create a thumbnail of the given dimensions. The thumbnail is sized according to the layer dimensions, not the image dimensions. If the requested size is too big a null QImage is created. If the current node cannot generate a thumbnail, a transparent QImage of the requested size is generated.

Returns
a QImage representing the layer contents.

Definition at line 748 of file Node.cpp.

749{
750 if (!d->node) return QImage();
751 return d->node->createThumbnail(w, h);
752}
virtual QImage createThumbnail(qint32 w, qint32 h, Qt::AspectRatioMode aspectRatioMode=Qt::IgnoreAspectRatio, KisThumbnailBoundsMode boundsMode=KisThumbnailBoundsMode::Precise)

References KisBaseNode::createThumbnail(), d, and Node::Private::node.

◆ type

QString Node::type ( ) const
virtualslot

type Krita has several types of nodes, split in layers and masks. Group layers can contain other layers, any layer can contain masks.

Returns
The type of the node. Valid types are:
  • paintlayer
  • grouplayer
  • filelayer
  • filterlayer
  • filllayer
  • clonelayer
  • vectorlayer
  • transparencymask
  • filtermask
  • transformmask
  • selectionmask
  • colorizemask

If the Node object isn't wrapping a valid Krita layer or mask object, and empty string is returned.

Definition at line 464 of file Node.cpp.

465{
466 if (!d->node) return QString();
467 if (qobject_cast<const KisPaintLayer*>(d->node)) {
468 return "paintlayer";
469 }
470 else if (qobject_cast<const KisGroupLayer*>(d->node)) {
471 return "grouplayer";
472 }
473 if (qobject_cast<const KisFileLayer*>(d->node)) {
474 return "filelayer";
475 }
476 if (qobject_cast<const KisAdjustmentLayer*>(d->node)) {
477 return "filterlayer";
478 }
479 if (qobject_cast<const KisGeneratorLayer*>(d->node)) {
480 return "filllayer";
481 }
482 if (qobject_cast<const KisCloneLayer*>(d->node)) {
483 return "clonelayer";
484 }
485 if (qobject_cast<const KisReferenceImagesLayer*>(d->node)) {
486 return "referenceimageslayer";
487 }
488 if (qobject_cast<const KisShapeLayer*>(d->node)) {
489 return "vectorlayer";
490 }
491 if (qobject_cast<const KisTransparencyMask*>(d->node)) {
492 return "transparencymask";
493 }
494 if (qobject_cast<const KisFilterMask*>(d->node)) {
495 return "filtermask";
496 }
497 if (qobject_cast<const KisTransformMask*>(d->node)) {
498 return "transformmask";
499 }
500 if (qobject_cast<const KisSelectionMask*>(d->node)) {
501 return "selectionmask";
502 }
503 if (qobject_cast<const KisColorizeMask*>(d->node)) {
504 return "colorizemask";
505 }
506 return QString();
507}

References d, and Node::Private::node.

◆ uniqueId

QUuid Node::uniqueId ( ) const
slot

uniqueId uniqueId of the node

Returns
a QUuid representing a unique id to identify the node

Definition at line 812 of file Node.cpp.

813{
814 if (!d->node) return QUuid();
815 return d->node->uuid();
816}
QUuid uuid() const

References d, Node::Private::node, and KisBaseNode::uuid().

◆ visible

bool Node::visible ( ) const
slot

Check whether the current Node is visible in the layer stack

Definition at line 518 of file Node.cpp.

519{
520 if (!d->node) return false;
521 return d->node->visible();
522}
virtual bool visible(bool recursive=false) const

References d, Node::Private::node, and KisBaseNode::visible().

Friends And Related Symbol Documentation

◆ CloneLayer

friend class CloneLayer
friend

Definition at line 724 of file Node.h.

◆ ColorizeMask

friend class ColorizeMask
friend

Definition at line 723 of file Node.h.

◆ Document

friend class Document
friend

Definition at line 712 of file Node.h.

◆ FileLayer

friend class FileLayer
friend

Definition at line 715 of file Node.h.

◆ FillLayer

friend class FillLayer
friend

Definition at line 717 of file Node.h.

◆ Filter

friend class Filter
friend

Definition at line 711 of file Node.h.

◆ FilterLayer

friend class FilterLayer
friend

Definition at line 716 of file Node.h.

◆ FilterMask

friend class FilterMask
friend

Definition at line 719 of file Node.h.

◆ GroupLayer

friend class GroupLayer
friend

Definition at line 714 of file Node.h.

◆ Selection

friend class Selection
friend

Definition at line 713 of file Node.h.

◆ SelectionMask

friend class SelectionMask
friend

Definition at line 720 of file Node.h.

◆ TransformMask

friend class TransformMask
friend

Definition at line 722 of file Node.h.

◆ TransparencyMask

friend class TransparencyMask
friend

Definition at line 721 of file Node.h.

◆ VectorLayer

friend class VectorLayer
friend

Definition at line 718 of file Node.h.

Member Data Documentation

◆ d

Private* const Node::d
private

Definition at line 737 of file Node.h.


The documentation for this class was generated from the following files: