|
Krita Source Code Documentation
|
#include <kis_group_layer.h>
Inheritance diagram for KisGroupLayer:Protected Member Functions | |
| QRect | amortizedProjectionRectForCleanupInChangePass () const override |
| KisLayer * | onlyMeaningfulChild () const |
| std::tuple< KisPaintDeviceSP, bool > | originalImpl () const |
| KisPaintDeviceSP | tryObligeChild () const |
Protected Member Functions inherited from KisLayer | |
| QRect | applyMasks (const KisPaintDeviceSP source, KisPaintDeviceSP destination, const QRect &requestedRect, KisNodeSP filthyNode, KisNodeSP lastNode, KisRenderPassFlags flags) const |
| bool | canMergeAndKeepBlendOptions (KisLayerSP otherLayer) |
| QRect | changeRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const override |
| void | childNodeChanged (KisNodeSP changedChildNode) override |
| virtual void | copyOriginalToProjection (const KisPaintDeviceSP original, KisPaintDeviceSP projection, const QRect &rect) const |
| virtual QRect | incomingChangeRect (const QRect &rect) const |
| QRect | masksChangeRect (const QList< KisEffectMaskSP > &masks, const QRect &requestedRect, bool &rectVariesFlag) const |
| QRect | masksNeedRect (const QList< KisEffectMaskSP > &masks, const QRect &changeRect, QStack< QRect > &applyRects, bool &rectVariesFlag) const |
| QRect | needRectForOriginal (const QRect &rect) const |
| virtual QRect | outgoingChangeRect (const QRect &rect) const |
| QList< KisEffectMaskSP > | searchEffectMasks (KisNodeSP lastNode) const |
| QRect | updateProjection (const QRect &rect, KisNodeSP filthyNode, KisRenderPassFlags flags) |
Protected Member Functions inherited from KisNode | |
| virtual QRect | accessRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const |
| void | addKeyframeChannel (KisKeyframeChannel *channel) override |
| void | baseNodeChangedCallback () override |
| void | baseNodeCollapsedChangedCallback () override |
| void | baseNodeInvalidateAllFramesCallback () override |
| virtual KisFrameChangeUpdateRecipe | handleKeyframeChannelFrameAboutToBeRemovedImpl (const KisKeyframeChannel *channel, int time) |
| virtual QRect | needRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const |
| void | notifyParentVisibilityChanged (bool value) override |
| KisBaseNodeSP | parentCallback () const override |
Protected Member Functions inherited from KisBaseNode | |
| virtual KisKeyframeChannel * | requestKeyframeChannel (const QString &id) |
| void | setSupportsLodMoves (bool value) |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Private Member Functions | |
| bool | checkCloneLayer (KisCloneLayerSP clone) const |
| bool | checkNodeRecursively (KisNodeSP node) const |
Private Attributes | |
| Private *const | m_d |
Additional Inherited Members | |
Public Types inherited from KisNode | |
| enum | PositionToFilthy { N_ABOVE_FILTHY = 0x08 , N_FILTHY_PROJECTION = 0x20 , N_FILTHY = 0x40 , N_BELOW_FILTHY = 0x80 } |
Public Types inherited from KisBaseNode | |
| typedef QList< Property > | PropertyList |
Signals inherited from KisNode | |
| void | sigNodeChangedInternal () |
Signals inherited from KisBaseNode | |
| void | keyframeChannelAdded (KisKeyframeChannel *channel) |
| void | opacityChanged (quint8 value) |
A KisLayer that bundles child layers into a single layer. The top layer is firstChild(), with index 0; the bottommost lastChild() with index childCount() - 1. KisLayer::nextSibling() moves towards higher indices, from the top to the bottom layer; prevSibling() the reverse. (Implementation detail: internally, the indices are reversed, for speed.)
Definition at line 32 of file kis_group_layer.cc.
| KisGroupLayer::KisGroupLayer | ( | KisImageWSP | image, |
| const QString & | name, | ||
| quint8 | opacity, | ||
| const KoColorSpace * | colorSpace = 0 ) |
Definition at line 51 of file kis_group_layer.cc.
References colorSpace(), and resetCache().
| KisGroupLayer::KisGroupLayer | ( | const KisGroupLayer & | rhs | ) |
Definition at line 58 of file kis_group_layer.cc.
References m_d, and passThroughMode.
|
override |
|
overridevirtual |
Accept the specified visitor.
Reimplemented from KisBaseNode.
Definition at line 358 of file kis_group_layer.cc.
References v.
|
overridevirtual |
Accept the KisNodeVisitor (for the Visitor design pattern), should call the correct function on the KisProcessingVisitor for this node type, so you need to override it for all leaf classes in the node inheritance hierarchy.
The processing visitor differs from node visitor in the way that it accepts undo adapter, that allows the processing to be multithreaded
Reimplemented from KisBaseNode.
Definition at line 363 of file kis_group_layer.cc.
References KisProcessingVisitor::visit().
|
overridevirtual |
Re-implement this method to add constraints for the subclasses that can be added as children to this node
Implements KisNode.
Definition at line 114 of file kis_group_layer.cc.
References KisImage::allowMasksOnRootNode(), checkNodeRecursively(), KisSharedPtr< T >::data(), KisBaseNode::image, KisNode::parent, and KisLayer::selectionMask().
|
overrideprotectedvirtual |
Internal projection device that should be updated in the changeRect pass even when the change rect is cropped by masks or something like that
Reimplemented from KisLayer.
Definition at line 294 of file kis_group_layer.cc.
References KisPaintDevice::exactBoundsAmortized(), KisLayer::hasEffectMasks(), m_d, and KisLayer::projection().
| QRect KisGroupLayer::calculateChildrenLooseUserVisibleBounds | ( | ) | const |
Definition at line 445 of file kis_group_layer.cc.
References collectRects().
| QRect KisGroupLayer::calculateChildrenTightUserVisibleBounds | ( | ) | const |
Definition at line 440 of file kis_group_layer.cc.
References collectRects().
|
private |
Definition at line 75 of file kis_group_layer.cc.
References allowAsChild(), clone(), KisNode::parent, and source().
|
private |
Definition at line 95 of file kis_group_layer.cc.
References checkCloneLayer(), checkNodeRecursively(), KisSharedPtr< T >::data(), KisNode::firstChild(), and KisNode::nextSibling().
|
inlineoverridevirtual |
Implements KisNode.
Definition at line 30 of file kis_group_layer.h.
|
overridevirtual |
XXX: make the colorspace of a layergroup user-settable: we want to be able to have, for instance, a group of grayscale layers resulting in a grayscale projection that is then merged with an rgb image stack.
Implements KisBaseNode.
Definition at line 142 of file kis_group_layer.cc.
References m_d.
|
overridevirtual |
Create and return a layer that is the result of merging this with layer.
This method is designed to be called only within KisImage::mergeLayerDown().
Descendants override this to create specific merged types when possible. The KisLayer one creates a KisPaintLayerSP via a bitBlt, and can work on all layer types.
Descendants that perform their own version do NOT call KisLayer::createMergedLayer
Reimplemented from KisLayer.
Definition at line 158 of file kis_group_layer.cc.
References KisNodeFacade::addNode(), KisLayer::canMergeAndKeepBlendOptions(), KisNode::clone(), KisLayer::createMergedLayerTemplate(), KisSharedPtr< T >::data(), KisNode::firstChild(), KisBaseNode::image, KisGroupLayer(), KisNode::nextSibling(), and KisImage::refreshGraphAsync().
| KoColor KisGroupLayer::defaultProjectionColor | ( | ) | const |
Definition at line 314 of file kis_group_layer.cc.
References m_d.
|
overridevirtual |
Returns the exact bounds of where the actual data resides in this node.
Reimplemented from KisBaseNode.
Definition at line 433 of file kis_group_layer.cc.
References calculateChildrenTightUserVisibleBounds(), KisLayer::exactBounds(), and m_d.
|
overridevirtual |
Returns an approximation of where the bounds on actual data are in this node.
Reimplemented from KisBaseNode.
Definition at line 426 of file kis_group_layer.cc.
References calculateChildrenLooseUserVisibleBounds(), KisLayer::extent(), and m_d.
|
overridevirtual |
Reimplemented from KisLayer.
Definition at line 181 of file kis_group_layer.cc.
References KisSharedPtr< T >::data(), and KisLayer::fillMergedLayerTemplate().
|
overridevirtual |
Reimplemented from KisBaseNode.
Definition at line 147 of file kis_group_layer.cc.
References KisIconUtils::loadIcon().
| KisPaintDeviceSP KisGroupLayer::lazyDestinationForSubtreeComposition | ( | ) | const |
Returns own original device when tryOblidgeChild() mechanism is not triggered. When tryOblidgeChild() mechanism is in action, returns null (therefor there is no need to do subtree composition).
Definition at line 285 of file kis_group_layer.cc.
References originalImpl().
|
protected |
Definition at line 214 of file kis_group_layer.cc.
References KisSharedPtr< T >::data(), KisNode::firstChild(), KisBaseNode::isFakeNode(), and KisNode::nextSibling().
|
overridevirtual |
Implements KisLayer.
Definition at line 280 of file kis_group_layer.cc.
References originalImpl().
| std::tuple< KisPaintDeviceSP, bool > KisGroupLayer::originalImpl | ( | ) | const |
We are too lazy! Let's our children work for us. Try to use children's paintDevice if it's the only one in stack and meets some conditions
Definition at line 259 of file kis_group_layer.cc.
References KisNode::childCount(), m_d, and tryObligeChild().
|
protected |
|
overridevirtual |
Group layers don't have a paint device, so return 0.
Implements KisBaseNode.
| bool KisGroupLayer::passThroughMode | ( | ) | const |
|
inline |
Definition at line 35 of file kis_group_layer.cc.
| bool KisGroupLayer::projectionIsValid | ( | ) | const |
Definition at line 304 of file kis_group_layer.cc.
References tryObligeChild().
| void KisGroupLayer::resetCache | ( | const KoColorSpace * | colorSpace | ) |
Clear the projection
Definition at line 188 of file kis_group_layer.cc.
References KisImage::colorSpace(), colorSpace(), KisBaseNode::image, m_d, KisPaintDevice::setX(), KisPaintDevice::setY(), x, and y.
|
overridevirtual |
Return a the properties of this base node (locked, visible etc, with the right icons for their representation and their state.
Subclasses can extend this list with new properties, like opacity for layers or visualized for masks.
The order of properties is, unfortunately, for now, important, so take care which properties superclasses of your class define.
KisBaseNode defines visible = 0, locked = 1 KisLayer defines opacity = 2, compositeOp = 3 KisMask defines active = 2 (KisMask does not inherit kislayer)
Reimplemented from KisBaseNode.
Definition at line 338 of file kis_group_layer.cc.
References KisLayerPropertiesIcons::getProperty(), KisLayerPropertiesIcons::passThrough, passThroughMode, and KisLayer::sectionModelProperties().
A special method that changes the default color of the projection merged onto this group layer. Please note, that you cannot use original()->setDefaultPixel(), because original() device can be switched by tryOblidgeChild() mechanism randomly.
Definition at line 309 of file kis_group_layer.cc.
References m_d.
|
overridevirtual |
Reimplemented from KisBaseNode.
Definition at line 152 of file kis_group_layer.cc.
References KisBaseNode::image, m_d, and KisLayer::setImage().
| void KisGroupLayer::setPassThroughMode | ( | bool | value | ) |
Definition at line 325 of file kis_group_layer.cc.
References KisNode::baseNodeChangedCallback(), KisNode::baseNodeInvalidateAllFramesCallback(), colorSpace(), m_d, KisLayer::notifyChildMaskChanged(), resetCache(), and value().
|
overridevirtual |
Change the section model properties.
Reimplemented from KisBaseNode.
Definition at line 347 of file kis_group_layer.cc.
References KisBaseNode::Property::name, KisBaseNode::properties, setPassThroughMode(), KisLayer::setSectionModelProperties(), and KisBaseNode::Property::state.
|
overridevirtual |
Set the x offset of this layer in the image place. Re-implement this where it makes sense, by default it does nothing. It should not move child nodes.
Reimplemented from KisBaseNode.
Definition at line 378 of file kis_group_layer.cc.
|
overridevirtual |
Set the y offset of this layer in the image place. Re-implement this where it makes sense, by default it does nothing. It should not move child nodes.
Reimplemented from KisBaseNode.
Definition at line 386 of file kis_group_layer.cc.
|
protected |
Definition at line 231 of file kis_group_layer.cc.
References KisLayer::channelFlags, KisPaintDevice::colorSpace(), colorSpace(), COMPOSITE_ALPHA_DARKEN, COMPOSITE_COPY, COMPOSITE_OVER, KisBaseNode::compositeOpId(), KisLayer::layerStyle, m_d, onlyMeaningfulChild(), KisBaseNode::opacity(), OPACITY_OPAQUE_U8, OPACITY_TRANSPARENT_U8, KisLayer::projection(), and KisBaseNode::visible().
|
overridevirtual |
Reimplemented from KisBaseNode.
|
overridevirtual |
Reimplemented from KisBaseNode.
|
private |
Definition at line 120 of file kis_group_layer.h.
| KisPaintDeviceSP KisGroupLayer::paintDevice |
Definition at line 43 of file kis_group_layer.cc.
| bool KisGroupLayer::passThroughMode |
Definition at line 46 of file kis_group_layer.cc.
| qint32 KisGroupLayer::x |
Definition at line 44 of file kis_group_layer.cc.
| qint32 KisGroupLayer::y |
Definition at line 45 of file kis_group_layer.cc.