|
Krita Source Code Documentation
|
#include <kis_adjustment_layer.h>
Inheritance diagram for KisAdjustmentLayer:Public Slots | |
| KisLayer * | layer () |
Public Slots inherited from KisSelectionBasedLayer | |
| KisLayer * | layer () |
| void | slotImageSizeChanged () |
Protected Member Functions | |
| QRect | incomingChangeRect (const QRect &rect) const override |
| QRect | needRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const override |
Protected Member Functions inherited from KisSelectionBasedLayer | |
| void | copyOriginalToProjection (const KisPaintDeviceSP original, KisPaintDeviceSP projection, const QRect &rect) const override |
| QRect | cropChangeRectBySelection (const QRect &rect) const |
| void | initSelection () |
| QRect | needRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const override |
| KisKeyframeChannel * | requestKeyframeChannel (const QString &id) override |
| void | setUseSelectionInProjection (bool value) const |
| bool | supportsKeyframeChannel (const QString &id) override |
Protected Member Functions inherited from KisLayer | |
| virtual QRect | amortizedProjectionRectForCleanupInChangePass () const |
| 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 |
| 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) |
| void | notifyParentVisibilityChanged (bool value) override |
| KisBaseNodeSP | parentCallback () const override |
Protected Member Functions inherited from KisBaseNode | |
| void | setSupportsLodMoves (bool value) |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
Protected Member Functions inherited from KisIndirectPaintingSupport | |
| void | lockTemporaryTargetForWrite () const |
| void | mergeToLayerImpl (KisPaintDeviceSP dst, KUndo2Command *parentCommand, const KUndo2MagicString &transactionText, int timedID, bool cleanResources, WriteLockerSP sharedWriteLock, QVector< KisRunnableStrokeJobData * > *jobs) |
| void | releaseResources () |
| QString | temporaryCompositeOp () const |
| virtual void | writeMergeData (KisPainter *painter, KisPaintDeviceSP src, const QRect &rc) |
Definition at line 25 of file kis_adjustment_layer.h.
| KisAdjustmentLayer::KisAdjustmentLayer | ( | KisImageWSP | image, |
| const QString & | name, | ||
| KisFilterConfigurationSP | kfc, | ||
| KisSelectionSP | selection ) |
creates a new adjustment layer with the given configuration and selection. Note that the selection will be copied (with COW, though).
| image | the image to set this AdjustmentLayer to |
| name | name of the adjustment layer |
| kfc | the configuration for the adjustment layer filter |
| selection | is a mask used by the adjustment layer to know where to apply the filter. |
Definition at line 26 of file kis_adjustment_layer.cc.
References COMPOSITE_COPY, KisBaseNode::setCompositeOpId(), and KisSelectionBasedLayer::setUseSelectionInProjection().
| KisAdjustmentLayer::KisAdjustmentLayer | ( | const KisAdjustmentLayer & | rhs | ) |
Definition at line 44 of file kis_adjustment_layer.cc.
|
override |
Definition at line 50 of file kis_adjustment_layer.cc.
|
overridevirtual |
Accept the KisNodeVisitor (for the Visitor design pattern), should call the correct function on the KisNodeVisitor for this node type, so you need to override it for all leaf classes in the node inheritance hierarchy.
return false if the visitor could not successfully act on this node instance.
Reimplemented from KisBaseNode.
Definition at line 104 of file kis_adjustment_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 109 of file kis_adjustment_layer.cc.
References KisProcessingVisitor::visit().
|
inlineoverridevirtual |
clones this AdjustmentLayer into a KisNodeSP type.
Implements KisNode.
Definition at line 51 of file kis_adjustment_layer.h.
|
overridevirtual |
gets the adjustmentLayer's tool filter
Reimplemented from KisBaseNode.
Definition at line 114 of file kis_adjustment_layer.cc.
References KisIconUtils::loadIcon().
|
overrideprotectedvirtual |
For KisLayer classes change rect transformation consists of two parts: incoming and outgoing.
1) incomingChangeRect(rect) chande rect transformation performed by the transformations done basing on global projection. It is performed in KisAsyncMerger + KisUpdateOriginalVisitor classes. It happens before data coming to KisLayer::original() therefore it is 'incoming'. See KisAdjustmentLayer for example of usage.
2) outgoingChangeRect(rect) change rect transformation that happens in KisLayer::copyOriginalToProjection(). It applies only when the layer is 'filthy', that is was the cause of the merge process. See KisCloneLayer for example of usage.
The flow of changed areas can be illustrated in the following way:
So in the end rect R4 will be passed up to the next layers in the stack.
After the change in the blending using setUseSelectionInProjection(false) we should not crop the change rect of the layer, because we pass contents through.
//filteredRect = cropChangeRectBySelection(filteredRect);
Reimplemented from KisLayer.
Definition at line 60 of file kis_adjustment_layer.cc.
References KisSharedPtr< T >::data(), KisNodeFilterInterface::filter(), KisFilterRegistry::instance(), KisLayer::projection(), and KoGenericRegistry< T >::value().
|
inlineslot |
gets this AdjustmentLayer. Overrides function in KisIndirectPaintingSupport
Definition at line 93 of file kis_adjustment_layer.h.
|
overrideprotectedvirtual |
Some filters need pixels outside the current processing rect to compute the new value (for instance, convolution filters) See changeRect See accessRect
If we need some additional pixels even outside of a selection for accurate layer filtering, we'll get them! And no KisSelectionBasedLayer::needRect will prevent us from doing this! ;) That's why simply we do not call KisSelectionBasedLayer::needRect here :)
Reimplemented from KisNode.
Definition at line 82 of file kis_adjustment_layer.cc.
References KisSharedPtr< T >::data(), KisNodeFilterInterface::filter(), KisFilterRegistry::instance(), needRect(), KisLayer::needRectForOriginal(), KisLayer::projection(), and KoGenericRegistry< T >::value().
|
overridevirtual |
gets the AdjustmentLayer properties describing whether or not the node is locked, visible, and the filter name is it is a filter. Overrides sectionModelProperties in KisLayer, and KisLayer overrides sectionModelProperties in KisBaseNode.
Reimplemented from KisBaseNode.
Definition at line 119 of file kis_adjustment_layer.cc.
References KisNodeFilterInterface::filter(), KisFilterRegistry::instance(), KisLayer::sectionModelProperties(), and value().
|
overridevirtual |
set the channelflags for this layer to the specified bit array. The bit array must have exactly the same number of channels as the colorspace this layer is in, or be empty, in which case all channels are active.
Reimplemented from KisLayer.
Definition at line 129 of file kis_adjustment_layer.cc.
References KisIndirectPaintingSupport::channelFlags, KisNodeFilterInterface::filter(), and KisLayer::setChannelFlags().
|
overridevirtual |
Reimplemented from KisNodeFilterInterface.
Definition at line 54 of file kis_adjustment_layer.cc.
References KisIndirectPaintingSupport::channelFlags, and KisNodeFilterInterface::setFilter().