39 , passThroughMode(false)
48 std::tuple<KisPaintDeviceSP, bool> originalImpl()
const;
65 m_d->paintDevice->setDefaultPixel(
const_cast<KisGroupLayer*
>(&rhs)->
m_d->paintDevice->defaultPixel());
66 m_d->paintDevice->setProjectionDevice(
true);
81 if (
source->inherits(
"KisGroupLayer")) {
87 newParent = newParent->
parent();
101 else if (node->inherits(
"KisGroupLayer")) {
125 if (node->inherits(
"KisSelectionMask")) {
126 return !qobject_cast<KisSelectionMask*>(node.
data())->active() || !
selectionMask();
132 if (node->inherits(
"KisMask")) {
144 return m_d->paintDevice->colorSpace();
168 cloned = child->
clone();
172 if (!merged->passThroughMode()) {
195 if (!
m_d->paintDevice) {
198 dev->
setX(this->
x());
199 dev->
setY(this->
y());
200 m_d->paintDevice = dev;
201 m_d->paintDevice->setProjectionDevice(
true);
205 m_d->paintDevice->clear();
210 m_d->paintDevice->clear();
220 KisLayer *layer = qobject_cast<KisLayer*>(child);
222 if (onlyLayer)
return 0;
247 quint8 defaultOpacity =
248 m_d->paintDevice->defaultPixel().opacityU8();
267 bool ownsOriginal =
false;
270 if (!
childCount() && !
m_d->paintDevice->extent().isEmpty()) {
271 m_d->paintDevice->clear();
273 realOriginal =
m_d->paintDevice;
277 return std::make_tuple(realOriginal, ownsOriginal);
288 bool ownsOriginal =
false;
291 return ownsOriginal ? originalDev :
nullptr;
311 m_d->paintDevice->setDefaultPixel(color);
316 KoColor color(
m_d->paintDevice->defaultPixel(),
m_d->paintDevice->colorSpace());
322 return m_d->passThroughMode;
327 if (
m_d->passThroughMode ==
value)
return;
330 if (
m_d->passThroughMode) {
350 if (property.
name == i18n(
"Pass Through")) {
360 return v.visit(
this);
365 return visitor.
visit(
this, undoAdapter);
370 return m_d->paintDevice ?
m_d->paintDevice->x() :
m_d->x;
375 return m_d->paintDevice ?
m_d->paintDevice->y() :
m_d->y;
381 if(
m_d->paintDevice) {
382 m_d->paintDevice->setX(
x);
389 if(
m_d->paintDevice) {
390 m_d->paintDevice->setY(
y);
408template <
class MetricPolicy>
418 accumulator |= policy(child);
428 return m_d->passThroughMode ?
435 return m_d->passThroughMode ?
float value(const T *src, size_t ch)
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
const quint8 OPACITY_TRANSPARENT_U8
const quint8 OPACITY_OPAQUE_U8
const QString COMPOSITE_OVER
const QString COMPOSITE_COPY
const QString COMPOSITE_ALPHA_DARKEN
void refreshGraphAsync(KisNodeSP root, const QVector< QRect > &rects, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) override
const KoColorSpace * colorSpace() const
bool allowMasksOnRootNode() const
static const KoID passThrough
static KisBaseNode::Property getProperty(const KoID &id, bool state)
const KoColorSpace * colorSpace() const
QRect exactBoundsAmortized() const
virtual void visit(KisNode *node, KisUndoAdapter *undoAdapter)=0
QRect collectRects(const KisNode *node, MetricPolicy policy)
QIcon loadIcon(const QString &name)
QRect operator()(const KisNode *node)
QRect operator()(const KisNode *node)
const QString & compositeOpId() const
virtual bool isFakeNode() const
virtual bool visible(bool recursive=false) const
KisNodeSP clone() const override
void setDefaultProjectionColor(KoColor color)
bool checkNodeRecursively(KisNodeSP node) const
QIcon icon() const override
void setSectionModelProperties(const KisBaseNode::PropertyList &properties) override
bool checkCloneLayer(KisCloneLayerSP clone) const
void fillMergedLayerTemplate(KisLayerSP dstLayer, KisLayerSP prevLayer, bool skipPaintingThisLayer) override
QRect extent() const override
KisBaseNode::PropertyList sectionModelProperties() const override
bool allowAsChild(KisNodeSP) const override
KisLayer * onlyMeaningfulChild() const
bool projectionIsValid() const
const KoColorSpace * colorSpace() const override
std::tuple< KisPaintDeviceSP, bool > originalImpl() const
QRect calculateChildrenTightUserVisibleBounds() const
KisPaintDeviceSP lazyDestinationForSubtreeComposition() const
KisLayerSP createMergedLayerTemplate(KisLayerSP prevLayer) override
bool accept(KisNodeVisitor &v) override
void setImage(KisImageWSP image) override
KisPaintDeviceSP tryObligeChild() const
void setX(qint32 x) override
KisPaintDeviceSP original() const override
void setPassThroughMode(bool value)
QRect calculateChildrenLooseUserVisibleBounds() const
void resetCache(const KoColorSpace *colorSpace)
void setY(qint32 y) override
QRect exactBounds() const override
KoColor defaultProjectionColor() const
QRect amortizedProjectionRectForCleanupInChangePass() const override
KisPaintDeviceSP paintDevice
KisGroupLayer(KisImageWSP image, const QString &name, quint8 opacity, const KoColorSpace *colorSpace=0)
~KisGroupLayer() override
KisPaintDeviceSP projection() const override
void setImage(KisImageWSP image) override
virtual void fillMergedLayerTemplate(KisLayerSP dstLayer, KisLayerSP prevLayer, bool skipPaintingThisLayer=false)
virtual KisLayerSP createMergedLayerTemplate(KisLayerSP prevLayer)
bool canMergeAndKeepBlendOptions(KisLayerSP otherLayer)
bool hasEffectMasks() const
QRect exactBounds() const override
virtual KisSelectionMaskSP selectionMask() const
KisPSDLayerStyleSP layerStyle
QRect extent() const override
void notifyChildMaskChanged()
void setSectionModelProperties(const KisBaseNode::PropertyList &properties) override
KisBaseNode::PropertyList sectionModelProperties() const override
bool addNode(KisNodeSP node, KisNodeSP parent=KisNodeSP(), KisNodeAdditionFlags flags=KisNodeAdditionFlag::None)
void baseNodeInvalidateAllFramesCallback() override
void baseNodeChangedCallback() override
KisNodeSP firstChild() const
virtual KisAbstractProjectionPlaneSP projectionPlane() const
KisProjectionLeafSP projectionLeaf
virtual KisNodeSP clone() const =0
quint32 childCount() const
KisNodeSP nextSibling() const