|
Krita Source Code Documentation
|
#include <KisBatchNodeUpdate.h>
Inheritance diagram for KisBatchNodeUpdate:Public Member Functions | |
| void | addUpdate (KisNodeSP node, const QRect &rc) |
| void | compress () |
| KisBatchNodeUpdate | compressed () const |
| KisBatchNodeUpdate ()=default | |
| KisBatchNodeUpdate (const KisBatchNodeUpdate &rhs)=default | |
| KisBatchNodeUpdate (const std::vector< std::pair< KisNodeSP, QRect > > &rhs) | |
| KisBatchNodeUpdate (KisBatchNodeUpdate &&rhs)=default | |
| KisBatchNodeUpdate & | operator= (const KisBatchNodeUpdate &rhs)=default |
| KisBatchNodeUpdate & | operator|= (const KisBatchNodeUpdate &rhs) |
A simple class for storing the updates of multiple nodes in a single place. These updates may later be "compressed", which means that only the topmost root layers will get updates. In such a case the update should be issued as refreshGraphAsync().
Definition at line 23 of file KisBatchNodeUpdate.h.
|
default |
|
default |
|
default |
| KisBatchNodeUpdate::KisBatchNodeUpdate | ( | const std::vector< std::pair< KisNodeSP, QRect > > & | rhs | ) |
Definition at line 12 of file KisBatchNodeUpdate.cpp.
Add an update designated for node with dirty rect rc
Please node that adding multiple updates for the same node, will result in multiple records added into the internal vector. These duplicated records may be resolved by calling compress() method.
Definition at line 18 of file KisBatchNodeUpdate.cpp.
| void KisBatchNodeUpdate::compress | ( | ) |
Compress the stored updates:
1) All updates for the same node will be merged into one
2) If the list contains a child and its parent, the two updates will be merged into one. This new update record will be designated for the parent.
The idea is that the parent will be updated with refreshGraphAsync(), which would update the child anyway.
Definition at line 23 of file KisBatchNodeUpdate.cpp.
References compressed().
| KisBatchNodeUpdate KisBatchNodeUpdate::compressed | ( | ) | const |
Definition at line 28 of file KisBatchNodeUpdate.cpp.
References KisLayerUtils::checkIsChildOf(), and KisLayerUtils::sortAndFilterMergeableInternalNodes().
|
default |
| KisBatchNodeUpdate & KisBatchNodeUpdate::operator|= | ( | const KisBatchNodeUpdate & | rhs | ) |
Merge two update batches. The updates for the same nodes will be merged. This merge operation does not do parent-child compression though. You need to call compress() separately for that.
Definition at line 54 of file KisBatchNodeUpdate.cpp.