31 bool isTemporaryHidden =
false;
34 const KisGroupLayer *group = qobject_cast<const KisGroupLayer*>(node);
39 return qobject_cast<const KisSelectionMask*>(node);
57 return node->
parent() && checkPassThrough(node->
parent());
61 return checkPassThrough(node);
70 return !skipSelectionMasksForward(node->
nextSibling()) &&
106 if (Private::isSelectionMask(
m_d->node)) {
107 if (
m_d->overlayProjectionLeaf() ==
this) {
114 while (
node && Private::checkPassThrough(
node)) {
126 if (!
m_d->checkThisPassThrough()) {
128 node = Private::skipSelectionMasksForward(
node);
152 if (!
m_d->checkThisPassThrough()) {
154 node = Private::skipSelectionMasksBackward(
node);
162 if (Private::isSelectionMask(
m_d->node)) {
165 if (
m_d->overlayProjectionLeaf() ==
this) {
167 node = Private::skipSelectionMasksBackward(
node);
176 if (
m_d->checkThisPassThrough()) {
178 node = Private::skipSelectionMasksBackward(
node);
183 node = Private::skipSelectionMasksBackward(
node);
187 while (!
node && leaf->
m_d->checkParentPassThrough()) {
190 node = Private::skipSelectionMasksBackward(
node);
198 if (Private::isSelectionMask(
m_d->node)) {
203 if (overlayLeaf &&
m_d->isTopmostNode()) {
208 node = Private::skipSelectionMasksForward(
node);
212 node = Private::skipSelectionMasksForward(
node);
215 if (!
node &&
m_d->checkParentPassThrough()) {
217 node = Private::skipSelectionMasksForward(
node);
230 return m_d->node->projectionPlane();
235 return m_d->node->accept(visitor);
240 return m_d->node->original();
245 return m_d->node->projection();
250 const KisGroupLayer *group = qobject_cast<const KisGroupLayer*>(
m_d->node.data());
256 return (
bool)!
m_d->node->parent();
261 return (
bool)qobject_cast<const KisLayer*>(
m_d->node.data()) &&
262 !
m_d->node->isFakeNode();
267 return (
bool)qobject_cast<const KisMask*>(
m_d->node.data()) &&
268 !
m_d->node->isFakeNode();
273 return (
bool)qobject_cast<const KisGroupLayer*>(
m_d->node.data());
278 return (
bool)qobject_cast<const KisAdjustmentLayer*>(
m_d->node.data());
287 bool hiddenByParentPassThrough =
false;
295 return (
m_d->node->visible(
false) ||
m_d->node->isIsolatedRoot()) &&
296 !
m_d->checkThisPassThrough() &&
297 !hiddenByParentPassThrough;
304 if (
m_d->checkParentPassThrough()) {
305 quint8 parentOpacity =
m_d->node->parent()->projectionLeaf()->opacity();
310 return resultOpacity;
317 KisLayer *layer = qobject_cast<KisLayer*>(
m_d->node.data());
322 if (
m_d->checkParentPassThrough()) {
323 QBitArray parentChannelFlags;
325 if (*
m_d->node->colorSpace() ==
326 *
m_d->node->parent()->colorSpace()) {
328 KisLayer *parentLayer = qobject_cast<KisLayer*>(
m_d->node->parent().data());
340 return (
bool)
m_d->node->graphListener();
345 KisLayer *layer = qobject_cast<KisLayer*>(
m_d->node.data());
346 return layer ? layer->
hasClones() :
false;
361 if (qobject_cast<KisMask*>(
m_d->node.data()) &&
362 m_d->checkParentPassThrough()) {
368 if (cloneLayer && cloneLayer->
copyFrom()) {
371 if (leaf->m_d->checkThisPassThrough()) {
381 return this ==
m_d->overlayProjectionLeaf();
391 return m_d->isTemporaryHidden;
400 if (!
m_d->checkThisPassThrough())
return;
402 m_d->temporarySetPassThrough(
false);
412 m_d->temporarySetPassThrough(
true);
float value(const T *src, size_t ch)
void startMerge(KisBaseRectsWalker &walker, bool notifyClones=true)
void collectRects(KisNodeSP node, const QRect &requestedRect)
virtual QRect bounds() const =0
KisDefaultBoundsBaseSP defaultBounds() const
bool isSelectionMask(KisNodeSP node)
QSharedPointer< KisProjectionLeaf > KisProjectionLeafSP
quint8 mergeOpacityU8(quint8 opacity, quint8 parentOpacity)
QBitArray mergeChannelFlags(const QBitArray &childFlags, const QBitArray &parentFlags)
virtual bool visible(bool recursive=false) const
KisPaintDeviceSP lazyDestinationForSubtreeComposition() const
void setPassThroughMode(bool value)
virtual KisNode * graphOverlayNode() const
KisNodeSP prevSibling() const
KisNodeSP firstChild() const
KisProjectionLeafSP projectionLeaf
KisNodeSP lastChild() const
KisNodeSP nextSibling() const
KisNodeGraphListener * graphListener
static KisNodeSP skipSelectionMasksForward(KisNodeSP node)
virtual ~KisProjectionLeaf()
KisProjectionLeafSP parent() const
bool dependsOnLowerNodes() const
KisAbstractProjectionPlaneSP projectionPlane() const
void explicitlyRegeneratePassThroughProjection()
KisNodeSP findRoot() const
const QScopedPointer< Private > m_d
bool checkThisPassThrough()
KisProjectionLeafSP prevSibling() const
static KisNodeSP skipSelectionMasksBackward(KisNodeSP node)
bool isTopmostNode() const
bool shouldBeRendered() const
KisPaintDeviceSP original()
KisPaintDeviceSP lazyDestinationForSubtreeComposition()
bool isStillInGraph() const
bool checkParentPassThrough()
bool isTemporaryHiddenFromRendering() const
KisProjectionLeafSP nextSibling() const
bool isDroppedNode() const
static bool isSelectionMask(const KisNode *node)
KisProjectionLeaf(KisNode *node)
void temporarySetPassThrough(bool value)
static bool checkPassThrough(const KisNode *node)
bool canHaveChildLayers() const
void setTemporaryHiddenFromRendering(bool value)
bool accept(KisNodeVisitor &visitor)
QBitArray channelFlags() const
bool isOverlayProjectionLeaf() const
NodeDropReason dropReason() const
KisProjectionLeafSP lastChild() const
KisPaintDeviceSP projection()
KisProjectionLeafSP overlayProjectionLeaf() const
KisProjectionLeafSP firstChild() const