|
Krita Source Code Documentation
|
#include <kis_image.h>
Inheritance diagram for KisImage:Classes | |
| class | KisImagePrivate |
Signals | |
| void | sigAboutToBeDeleted () |
| void | sigColorSpaceChanged (const KoColorSpace *cs) |
| void | sigImageModified () |
| void | sigImageModifiedWithoutUndo () |
| void | sigImageUpdated (const QRect &) |
| void | sigInternalStopIsolatedModeRequested () |
| void | sigIsolatedModeChanged () |
| void | sigLayersChangedAsync () |
| void | sigNodeAddedAsync (KisNodeSP node, KisNodeAdditionFlags flags) |
| void | sigNodeChanged (KisNodeSP node) |
| void | sigNodeCollapsedChanged () |
| void | sigProfileChanged (const KoColorProfile *profile) |
| void | sigProofingConfigChanged () |
| void | sigRedoDuringStrokeRequested () |
| void | sigRemoveNodeAsync (KisNodeSP node) |
| void | sigRequestNodeReselection (KisNodeSP activeNode, const KisNodeList &selectedNodes) |
| void | sigResolutionChanged (double xRes, double yRes) |
| void | sigSizeChanged (const QPointF &oldStillPoint, const QPointF &newStillPoint) |
| void | sigStrokeCancellationRequested () |
| void | sigStrokeEndRequested () |
| void | sigStrokeEndRequestedActiveNodeFiltered () |
| void | sigUndoDuringStrokeRequested () |
Public Member Functions | |
| void | aboutToAddANode (KisNode *parent, int index) override |
| void | aboutToRemoveANode (KisNode *parent, int index) override |
| void | addAnnotation (KisAnnotationSP annotation) |
| void | addComposition (KisLayerCompositionSP composition) |
| void | addJob (KisStrokeId id, KisStrokeJobData *data) override |
| KisProjectionUpdatesFilterCookie | addProjectionUpdatesFilter (KisProjectionUpdatesFilterSP filter) override |
| void | addSpontaneousJob (KisSpontaneousJob *spontaneousJob) |
| bool | allowMasksOnRootNode () const |
| KisImageAnimationInterface * | animationInterface () const |
| KisAnnotationSP | annotation (const QString &type) |
| bool | assignImageProfile (const KoColorProfile *profile, bool blockAllUpdates=false) |
| bool | assignLayerProfile (KisNodeSP node, const KoColorProfile *profile) |
| void | barrierLock (bool readOnly=false) |
| Wait until all the queued background jobs are completed and lock the image. | |
| vKisAnnotationSP_it | beginAnnotations () |
| void | blockUpdates () override |
| blockUpdates block updating the image projection | |
| QRect | bounds () const override |
| bool | cancelStroke (KisStrokeId id) override |
| bool | canReselectGlobalSelection () |
| KisImage * | clone (bool exactCopy=false) |
| const KoColorSpace * | colorSpace () const |
| KisCompositeProgressProxy * | compositeProgressProxy () |
| QList< KisLayerCompositionSP > | compositions () |
| void | convertImageColorSpace (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) |
| void | convertImageProjectionColorSpace (const KoColorSpace *dstColorSpace) |
| void | convertLayerColorSpace (KisNodeSP node, const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) |
| QImage | convertToQImage (const QSize &scaledImageSize, const KoColorProfile *profile) |
| QImage | convertToQImage (qint32 x1, qint32 y1, qint32 width, qint32 height, const KoColorProfile *profile) |
| QImage | convertToQImage (QRect imageRect, const KoColorProfile *profile) |
| void | copyFromImage (const KisImage &rhs) |
| void | cropImage (const QRect &newRect) |
| start asynchronous operation on cropping the image | |
| void | cropNode (KisNodeSP node, const QRect &newRect, const bool activeFrameOnly=false) |
start asynchronous operation on cropping a subtree of nodes starting at node | |
| void | cropNodes (KisNodeList nodes, const QRect &newRect, const bool activeFrameOnly=false) |
| int | currentLevelOfDetail () const |
| KisProjectionUpdatesFilterCookie | currentProjectionUpdatesFilter () const override |
| KoColor | defaultProjectionColor () const |
| void | disableDirtyRequests () override |
| void | disableUIUpdates () override |
| QPoint | documentToImagePixelFloored (const QPointF &documentCoord) const |
| QPointF | documentToPixel (const QPointF &documentCoord) const |
| QRectF | documentToPixel (const QRectF &documentRect) const |
| QRect | effectiveLodBounds () const |
| void | enableDirtyRequests () override |
| QVector< QRect > | enableUIUpdates () override |
| vKisAnnotationSP_it | endAnnotations () |
| void | endStroke (KisStrokeId id) override |
| void | flatten (KisNodeSP activeNode) |
| void | flattenLayer (KisLayerSP layer) |
| KisSelectionSP | globalSelection () const |
| KisNode * | graphOverlayNode () const override |
| bool | hasOverlaySelectionMask () const |
| bool | hasUpdatesRunning () const override |
| qint32 | height () const |
| void | immediateLockForReadOnly () |
| void | initialRefreshGraph () |
| void | invalidateAllFrames () override |
| void | invalidateFrames (const KisTimeSpan &range, const QRect &rect) override |
| bool | isIdle (bool allowLocked=false) |
| bool | isIsolatingGroup () const |
| bool | isIsolatingLayer () const |
| KisNodeSP | isolationRootNode () const |
| void | keyframeChannelAboutToBeRemoved (KisNode *node, KisKeyframeChannel *channel) override |
| void | keyframeChannelHasBeenAdded (KisNode *node, KisKeyframeChannel *channel) override |
| KisImage (KisUndoStore *undoStore, qint32 width, qint32 height, const KoColorSpace *colorSpace, const QString &name) | |
colorSpace can be null. In that case, it will be initialised to a default color space. | |
| const KUndo2Command * | lastExecutedCommand () const override |
| bool | locked () const |
| KisLodPreferences | lodPreferences () const |
| void | mergeDown (KisLayerSP l, const KisMetaData::MergeStrategy *strategy) |
| void | mergeMultipleLayers (QList< KisNodeSP > mergedLayers, KisNodeSP putAfter) |
| QPointF | mirrorAxesCenter () const |
| void | moveCompositionDown (KisLayerCompositionSP composition) |
| void | moveCompositionUp (KisLayerCompositionSP composition) |
| qint32 | nChildLayers () const |
| QString | nextLayerName (const QString &baseName="") const |
| qint32 | nHiddenLayers () const |
| qint32 | nlayers () const |
| void | nodeChanged (KisNode *node) override |
| void | nodeCollapsedChanged (KisNode *node) override |
| void | nodeHasBeenAdded (KisNode *parent, int index, KisNodeAdditionFlags flags) override |
| void | notifyAboutToBeDeleted () |
| void | notifyBatchUpdateEnded () override |
| void | notifyBatchUpdateStarted () override |
| void | notifyLayersChanged () |
| use if the layers have changed completely (eg. when flattening) | |
| void | notifyProjectionUpdated (const QRect &rc) override |
| void | notifySelectionChanged () override |
| void | notifyUIUpdateCompleted (const QRect &rc) override |
| KisSelectionMaskSP | overlaySelectionMask () const |
| QPointF | pixelToDocument (const QPoint &pixelCoord) const |
| QPointF | pixelToDocument (const QPointF &pixelCoord) const |
| QRectF | pixelToDocument (const QRectF &pixelCoord) const |
| KisPostExecutionUndoAdapter * | postExecutionUndoAdapter () const override |
| const KoColorProfile * | profile () const |
| KisPaintDeviceSP | projection () const |
| KisProofingConfigurationSP | proofingConfiguration () const |
| proofingConfiguration | |
| void | purgeUnusedData (bool isCancellable) |
| purge all pixels that have default pixel to free up memory | |
| void | refreshGraphAsync (KisNodeSP root, const QRect &rc, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| void | refreshGraphAsync (KisNodeSP root, const QRect &rc, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| virtual void | refreshGraphAsync (KisNodeSP root, const QVector< QRect > &rc, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None)=0 |
| void | refreshGraphAsync (KisNodeSP root, const QVector< QRect > &rects, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) override |
| void | refreshGraphAsync (KisNodeSP root=nullptr, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| void | removeAnnotation (const QString &type) |
| void | removeComposition (KisLayerCompositionSP composition) |
| KisProjectionUpdatesFilterSP | removeProjectionUpdatesFilter (KisProjectionUpdatesFilterCookie cookie) override |
| removes already installed filter from the stack of updates filers | |
| void | requestProjectionUpdate (KisNode *node, const QVector< QRect > &rects, KisProjectionUpdateFlags flags) override |
| void | requestTimeSwitch (int time) override |
| void | resizeImage (const QRect &newRect) |
| start asynchronous operation on resizing the image | |
| KisGroupLayerSP | rootLayer () const |
| void | rotateImage (double radians) |
| start asynchronous operation on rotating the image | |
| void | rotateNode (KisNodeSP node, double radians, KisSelectionSP selection) |
start asynchronous operation on rotating a subtree of nodes starting at node | |
| void | rotateNodes (KisNodeList nodes, double radians, KisSelectionSP selection) |
| void | scaleImage (const QSize &size, qreal xres, qreal yres, KisFilterStrategy *filterStrategy) |
| start asynchronous operation on scaling the image | |
| void | scaleNode (KisNodeSP node, const QPointF ¢er, qreal scaleX, qreal scaleY, KisFilterStrategy *filterStrategy, KisSelectionSP selection) |
start asynchronous operation on scaling a subtree of nodes starting at node | |
| void | scaleNodes (KisNodeList nodes, const QPointF ¢er, qreal scaleX, qreal scaleY, KisFilterStrategy *filterStrategy, KisSelectionSP selection) |
| void | setAllowMasksOnRootNode (bool value) |
| void | setDefaultProjectionColor (const KoColor &color) |
| void | setLodPreferences (const KisLodPreferences &value) |
| void | setMirrorAxesCenter (const QPointF &value) const |
| void | setModifiedWithoutUndo () |
| void | setOverlaySelectionMask (KisSelectionMaskSP mask) |
| void | setProofingConfiguration (KisProofingConfigurationSP proofingConfig) |
| setProofingConfiguration, this sets the image's proofing configuration, and signals the proofingConfiguration has changed. | |
| void | setResolution (double xres, double yres) |
| void | setRootLayer (KisGroupLayerSP rootLayer) |
| void | setUndoStore (KisUndoStore *undoStore) |
| void | setWorkingThreadsLimit (int value) |
| void | setWrapAroundModeAxis (WrapAroundAxis value) |
| void | setWrapAroundModePermitted (bool value) |
| void | shear (double angleX, double angleY) |
| start asynchronous operation on shearing the image | |
| void | shearNode (KisNodeSP node, double angleX, double angleY, KisSelectionSP selection) |
start asynchronous operation on shearing a subtree of nodes starting at node | |
| void | shearNodes (KisNodeList nodes, double angleX, double angleY, KisSelectionSP selection) |
| KisImageSignalRouter * | signalRouter () |
| QSize | size () const |
| bool | startIsolatedMode (KisNodeSP node, bool isolateLayer, bool isolateGroup) |
| KisStrokeId | startStroke (KisStrokeStrategy *strokeStrategy) override |
| bool | tryBarrierLock (bool readOnly=false) |
| Tries to lock the image without waiting for the jobs to finish. | |
| void | unblockUpdates () override |
| unblockUpdates unblock updating the image project. This only restarts the scheduler and does not schedule a full refresh. | |
| KisUndoAdapter * | undoAdapter () const |
| KisUndoStore * | undoStore () |
| void | unifyLayersColorSpace () |
| void | unlock () |
| void | waitForDone () |
| qint32 | width () const |
| int | workingThreadsLimit () const |
| bool | wrapAroundModeActive () const |
| WrapAroundAxis | wrapAroundModeAxis () const |
| bool | wrapAroundModePermitted () const |
| double | xRes () const |
| double | yRes () const |
| ~KisImage () override | |
Public Member Functions inherited from KisStrokesFacade | |
| virtual | ~KisStrokesFacade () |
Public Member Functions inherited from KisStrokeUndoFacade | |
| virtual | ~KisStrokeUndoFacade () |
Public Member Functions inherited from KisUpdatesFacade | |
| void | refreshGraphAsync (KisNodeSP root, const QRect &rc, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| void | refreshGraphAsync (KisNodeSP root, const QRect &rc, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| void | refreshGraphAsync (KisNodeSP root=nullptr, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) |
| virtual | ~KisUpdatesFacade () |
Public Member Functions inherited from KisProjectionUpdateListener | |
| virtual | ~KisProjectionUpdateListener () |
Public Member Functions inherited from KisNodeFacade | |
| bool | addNode (KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis, KisNodeAdditionFlags flags=KisNodeAdditionFlag::None) |
| bool | addNode (KisNodeSP node, KisNodeSP parent, quint32 index, KisNodeAdditionFlags flags=KisNodeAdditionFlag::None) |
| bool | addNode (KisNodeSP node, KisNodeSP parent=KisNodeSP(), KisNodeAdditionFlags flags=KisNodeAdditionFlag::None) |
| KisNodeFacade () | |
| KisNodeFacade (KisNodeSP root) | |
| bool | moveNode (KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis) |
| bool | moveNode (KisNodeSP node, KisNodeSP parent, quint32 index) |
| bool | removeNode (KisNodeSP node) |
| const KisNodeSP | root () const |
| void | setRoot (KisNodeSP root) |
| virtual | ~KisNodeFacade () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KisNodeGraphListener | |
| virtual void | aboutToMoveNode (KisNode *node, int oldIndex, int newIndex) |
| int | graphSequenceNumber () const |
| KisNodeGraphListener () | |
| virtual void | nodeHasBeenMoved (KisNode *node, int oldIndex, int newIndex) |
| virtual void | nodeHasBeenRemoved (KisNode *parent, int index) |
| Private () | |
| virtual | ~KisNodeGraphListener () |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Static Public Member Functions | |
| static KisImageSP | fromQImage (const QImage &image, KisUndoStore *undoStore) |
Private Types | |
| enum | CopyPolicy { CONSTRUCT = 1 , REPLACE = 2 , EXACT_COPY = 4 } |
Private Member Functions | |
| void | copyFromImageImpl (const KisImage &rhs, int policy) |
| void | emitSizeChanged () |
| KisImage (const KisImage &rhs, KisUndoStore *undoStore, bool exactCopy) | |
| KisImage & | operator= (const KisImage &rhs) |
| void | refreshHiddenArea (KisNodeSP rootNode, const QRect &preparedArea) |
| void | resizeImageImpl (const QRect &newRect, bool cropLayers) |
| void | rotateImpl (const KUndo2MagicString &actionName, KisNodeList nodes, double radians, bool resizeImage, KisSelectionSP selection) |
| void | rotateImpl (const KUndo2MagicString &actionName, KisNodeSP rootNode, double radians, bool resizeImage, KisSelectionSP selection) |
| void | safeRemoveTwoNodes (KisNodeSP node1, KisNodeSP node2) |
| void | setProjectionColorSpace (const KoColorSpace *colorSpace) |
| void | setSize (const QSize &size) |
| void | shearImpl (const KUndo2MagicString &actionName, KisNodeList nodes, bool resizeImage, double angleX, double angleY, KisSelectionSP selection) |
| void | shearImpl (const KUndo2MagicString &actionName, KisNodeSP rootNode, bool resizeImage, double angleX, double angleY, KisSelectionSP selection) |
Private Attributes | |
| KisImagePrivate * | m_d |
Friends | |
| class | KisImageGlobalSelectionManagementInterface |
| class | KisImageResizeCommand |
Additional Inherited Members | |
Public Attributes inherited from KisNodeFacade | |
| KisNodeWSP | root |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Public Attributes inherited from KisNodeGraphListener | |
| int | sequenceNumber |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
This is the image class, it contains a tree of KisLayer stack and meta information about the image. And it also provides some functions to manipulate the whole image.
Definition at line 56 of file kis_image.h.
|
private |
| Enumerator | |
|---|---|
| CONSTRUCT | we are copy-constructing a new KisImage |
| REPLACE | we are replacing the current KisImage with another |
| EXACT_COPY | |
Definition at line 124 of file kis_image.h.
| KisImage::KisImage | ( | KisUndoStore * | undoStore, |
| qint32 | width, | ||
| qint32 | height, | ||
| const KoColorSpace * | colorSpace, | ||
| const QString & | name ) |
colorSpace can be null. In that case, it will be initialised to a default color space.
Definition at line 315 of file kis_image.cc.
References connect(), OPACITY_OPAQUE_U8, setRootLayer(), sigInternalStopIsolatedModeRequested(), and stopIsolatedMode().
|
override |
Request the tools to end currently running strokes
Definition at line 330 of file kis_image.cc.
References m_d, and waitForDone().
|
private |
Definition at line 565 of file kis_image.cc.
References connect(), CONSTRUCT, copyFromImageImpl(), EXACT_COPY, sigInternalStopIsolatedModeRequested(), and stopIsolatedMode().
Inform the model that we're going to add a node.
Reimplemented from KisNodeGraphListener.
Definition at line 582 of file kis_image.cc.
References KisNodeGraphListener::aboutToAddANode(), and SANITY_CHECK_LOCKED.
Inform the model we're going to remove a node.
Reimplemented from KisNodeGraphListener.
Definition at line 604 of file kis_image.cc.
References KisNodeGraphListener::aboutToRemoveANode(), KisSharedPtr< T >::data(), KisImageSignalRouter::emitAboutToRemoveANode(), KisImage::KisImagePrivate::isolationRootNode, keyframeChannelAboutToBeRemoved(), KisBaseNode::keyframeChannels, m_d, KisLayerUtils::recursiveApplyNodes(), SANITY_CHECK_LOCKED, sigInternalStopIsolatedModeRequested(), and KisImage::KisImagePrivate::signalRouter.
| void KisImage::addAnnotation | ( | KisAnnotationSP | annotation | ) |
Add an annotation for this image. This can be anything: Gamma, EXIF, etc. Note that the "icc" annotation is reserved for the color strategies. If the annotation already exists, overwrite it with this one.
Definition at line 1834 of file kis_image.cc.
References annotation(), KisImage::KisImagePrivate::annotations, m_d, and setModifiedWithoutUndo().
| void KisImage::addComposition | ( | KisLayerCompositionSP | composition | ) |
Adds a new layer composition, will be saved with the image
Definition at line 2452 of file kis_image.cc.
References KisImage::KisImagePrivate::compositions, and m_d.
|
overridevirtual |
Implements KisStrokesFacade.
Definition at line 2101 of file kis_image.cc.
References KisUpdateScheduler::addJob(), KisUpdateTimeMonitor::instance(), m_d, KisUpdateTimeMonitor::reportJobStarted(), and KisImage::KisImagePrivate::scheduler.
|
overridevirtual |
Installs a filter object that will filter all the incoming projection update requests. If the filter return true, the incoming update is dropped.
NOTE: you can add multiple filters to the image, but the calls to add/remove must be nested and balanced. E.g.
Implements KisUpdatesFacade.
Definition at line 2234 of file kis_image.cc.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, m_d, and KisImage::KisImagePrivate::projectionUpdatesFilters.
| void KisImage::addSpontaneousJob | ( | KisSpontaneousJob * | spontaneousJob | ) |
Adds a spontaneous job to the updates queue.
A spontaneous job may do some trivial tasks in the background, like updating the outline of selection or purging unused tiles from the existing paint devices.
Definition at line 2224 of file kis_image.cc.
References KisUpdateScheduler::addSpontaneousJob(), m_d, and KisImage::KisImagePrivate::scheduler.
| bool KisImage::allowMasksOnRootNode | ( | ) | const |
Definition at line 2621 of file kis_image.cc.
References KisImage::KisImagePrivate::allowMasksOnRootNode, and m_d.
| KisImageAnimationInterface * KisImage::animationInterface | ( | ) | const |
Definition at line 2579 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, and m_d.
| KisAnnotationSP KisImage::annotation | ( | const QString & | type | ) |
get the annotation with the given type, can return 0
Definition at line 1850 of file kis_image.cc.
References KisImage::KisImagePrivate::annotations, and m_d.
| bool KisImage::assignImageProfile | ( | const KoColorProfile * | profile, |
| bool | blockAllUpdates = false ) |
Set the profile of the image to the new profile and do the same for all layers that have the same colorspace and profile of the image. It doesn't do any pixel conversion.
This is essential if you have loaded an image that didn't have an embedded profile to which you want to attach the right profile.
Definition at line 1463 of file kis_image.cc.
References KisProcessingApplicator::applyCommand(), KisProcessingApplicator::applyVisitor(), KisStrokeJobData::BARRIER, KisImage::KisImagePrivate::colorSpace, colorSpace(), KoColorSpaceRegistry::colorSpace(), KisStrokeJobData::CONCURRENT, dbgImage, KisProcessingApplicator::end(), KisCommandUtils::FlipFlopCommand::FINALIZING, KisCommandUtils::FlipFlopCommand::INITIALIZING, KoColorSpaceRegistry::instance(), kundo2_i18n(), m_d, KoColorProfile::name, KisProcessingApplicator::NO_IMAGE_UPDATES, KisProcessingApplicator::NO_UI_UPDATES, ppVar, profile(), KoColorSpace::profile(), ProfileChangedSignal, KisProcessingApplicator::RECURSIVE, KisLayerUtils::recursiveFindNode(), and KisImage::KisImagePrivate::rootLayer.
| bool KisImage::assignLayerProfile | ( | KisNodeSP | node, |
| const KoColorProfile * | profile ) |
Set the profile of the layer and all its children to the new profile. It doesn't do any pixel conversion.
This is essential if you have loaded an image that didn't have an embedded profile to which you want to attach the right profile.
Definition at line 1433 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), colorSpace(), KisBaseNode::colorSpace(), KoColorSpaceRegistry::colorSpace(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), KoColorSpaceRegistry::instance(), kundo2_i18n(), KisProcessingApplicator::NO_UI_UPDATES, profile(), KoColorSpace::profile(), KisNode::projectionLeaf, and KisProcessingApplicator::RECURSIVE.
| void KisImage::barrierLock | ( | bool | readOnly = false | ) |
Wait until all the queued background jobs are completed and lock the image.
KisImage object has a local scheduler that executes long-running image rendering/modifying jobs (we call them "strokes") in a background. Basically, one should either access the image from the scope of such jobs (strokes) or just lock the image before using.
Calling barrierLock() will wait until all the queued operations are finished and lock the image, so you can start accessing it in a safe way.
readOnly tells the image if the caller is going to modify the image during holding the lock. Locking with non-readOnly access will reset all the internal caches of the image (lod-planes) when the lock status will be lifted.
Definition at line 756 of file kis_image.cc.
References KisUpdateScheduler::barrierLock(), KisBusyWaitBroker::instance(), KisImage::KisImagePrivate::lockCount, locked(), KisImage::KisImagePrivate::lockedForReadOnly, m_d, KisBusyWaitBroker::notifyWaitOnImageEnded(), KisBusyWaitBroker::notifyWaitOnImageStarted(), requestStrokeEnd(), and KisImage::KisImagePrivate::scheduler.
| vKisAnnotationSP_it KisImage::beginAnnotations | ( | ) |
Start of an iteration over the annotations of this image (including the ICC Profile)
Definition at line 1878 of file kis_image.cc.
References KisImage::KisImagePrivate::annotations, and m_d.
|
overridevirtual |
blockUpdates block updating the image projection
Implements KisUpdatesFacade.
Definition at line 818 of file kis_image.cc.
References KisUpdateScheduler::blockUpdates(), m_d, and KisImage::KisImagePrivate::scheduler.
|
overridevirtual |
Implements KisUpdatesFacade.
Definition at line 1742 of file kis_image.cc.
|
overridevirtual |
Implements KisStrokesFacade.
Definition at line 2112 of file kis_image.cc.
References KisUpdateScheduler::cancelStroke(), m_d, and KisImage::KisImagePrivate::scheduler.
| bool KisImage::canReselectGlobalSelection | ( | ) |
Returns whether we can reselect current global selection
Definition at line 705 of file kis_image.cc.
References KisImage::KisImagePrivate::deselectedGlobalSelectionMask, and m_d.
| KisImage * KisImage::clone | ( | bool | exactCopy = false | ) |
Makes a copy of the image with all the layers. If possible, shallow copies of the layers are made.
exactCopy shows if the copied image should look exactly the same as the other one (according to it's .kra xml representation). It means that the layers will have the same UUID keys and, therefore, you are not expected to use the copied image anywhere except for saving. Don't use this option if you plan to work with the copied image later.
Definition at line 405 of file kis_image.cc.
References KisImage().
| const KoColorSpace * KisImage::colorSpace | ( | ) | const |
The default colorspace of this image: new layers will have this colorspace and the projection will have this colorspace.
Definition at line 1524 of file kis_image.cc.
References KisImage::KisImagePrivate::colorSpace, and m_d.
| KisCompositeProgressProxy * KisImage::compositeProgressProxy | ( | ) |
Definition at line 746 of file kis_image.cc.
References KisImage::KisImagePrivate::compositeProgressProxy, and m_d.
| QList< KisLayerCompositionSP > KisImage::compositions | ( | ) |
Returns the layer compositions for the image
Definition at line 2447 of file kis_image.cc.
References KisImage::KisImagePrivate::compositions, and m_d.
| void KisImage::convertImageColorSpace | ( | const KoColorSpace * | dstColorSpace, |
| KoColorConversionTransformation::Intent | renderingIntent, | ||
| KoColorConversionTransformation::ConversionFlags | conversionFlags ) |
Convert the image and all its layers to the dstColorSpace
Definition at line 1394 of file kis_image.cc.
References KisImage::KisImagePrivate::convertImageColorSpaceImpl(), and m_d.
| void KisImage::convertImageProjectionColorSpace | ( | const KoColorSpace * | dstColorSpace | ) |
Convert image projection to dstColorSpace, keeping all the layers intouched.
Definition at line 1401 of file kis_image.cc.
References KisImage::KisImagePrivate::convertImageColorSpaceImpl(), KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), and m_d.
| void KisImage::convertLayerColorSpace | ( | KisNodeSP | node, |
| const KoColorSpace * | dstColorSpace, | ||
| KoColorConversionTransformation::Intent | renderingIntent, | ||
| KoColorConversionTransformation::ConversionFlags | conversionFlags ) |
Convert layer and all its child layers to dstColorSpace
Definition at line 1292 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), KisBaseNode::colorSpace(), KisStrokeJobData::CONCURRENT, KisSharedPtr< T >::data(), KisProcessingApplicator::end(), KisBaseNode::image, KIS_SAFE_ASSERT_RECOVER_RETURN, kundo2_i18n(), KisNode::projectionLeaf, KisProcessingApplicator::RECURSIVE, and rootLayer().
| QImage KisImage::convertToQImage | ( | const QSize & | scaledImageSize, |
| const KoColorProfile * | profile ) |
Render a thumbnail of the projection onto a QImage.
Definition at line 1707 of file kis_image.cc.
References bounds(), colorSpace(), KisPaintDevice::convertToQImage(), convertToQImage(), KisPainter::copyAreaOptimized(), KisPainter::end(), height(), KisFilterStrategyRegistry::instance(), profile(), projection(), KisTransformWorker::run(), size(), KoDummyUpdaterHolder::updater(), value(), and width().
| QImage KisImage::convertToQImage | ( | qint32 | x1, |
| qint32 | y1, | ||
| qint32 | width, | ||
| qint32 | height, | ||
| const KoColorProfile * | profile ) |
Render the projection onto a QImage.
Definition at line 1690 of file kis_image.cc.
References KisPaintDevice::convertToQImage(), KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), profile(), and projection().
| QImage KisImage::convertToQImage | ( | QRect | imageRect, |
| const KoColorProfile * | profile ) |
Render the projection onto a QImage. (this is an overloaded function)
Definition at line 1679 of file kis_image.cc.
References convertToQImage(), and profile().
Definition at line 410 of file kis_image.cc.
References copyFromImageImpl(), and REPLACE.
We should replace the root before emitting any signals, because some of the layers may be subscribed to sigSizeChanged() signal (e.g. KisSelectionBasedLayer). So the old layers should be fully detached before we actually Q_EMIT this signal.
We should also change all the dimensional properties of the image before setting the image on the nodes, because some nodes may emit signals if something changes internally (e.g. resolution).
See bug 447599 for more details.
Definition at line 415 of file kis_image.cc.
References KisImage::KisImagePrivate::allowMasksOnRootNode, annotation(), KisImage::KisImagePrivate::annotations, KisNode::clone(), KisImage::KisImagePrivate::colorSpace, colorSpace(), KisImage::KisImagePrivate::compositions, CONSTRUCT, KisSharedPtr< T >::data(), dbgImage, KisImage::KisImagePrivate::disableDirtyRequests, KisImage::KisImagePrivate::disableUIUpdateSignals, EMIT_IF_NEEDED, EXACT_COPY, KisImage::KisImagePrivate::height, height(), KisImage::KisImagePrivate::isolateGroup, KisImage::KisImagePrivate::isolateLayer, KisImage::KisImagePrivate::isolationRootNode, KisBaseNode::keyframeChannels, KIS_ASSERT_RECOVER_NOOP, KIS_ASSERT_RECOVER_RETURN, m_d, KisLayer::notifyChildMaskChanged(), KisImage::KisImagePrivate::overlaySelectionMask, KisImage::KisImagePrivate::projectionUpdatesFilters, KisImage::KisImagePrivate::proofingConfig, KisLayerUtils::recursiveApplyNodes(), REPLACE, KisNodeFacade::root, KisImage::KisImagePrivate::rootLayer, KisNode::setGraphListener(), KisNode::setImage(), setProofingConfiguration(), KisNodeFacade::setRoot(), KisBaseNode::setUuid(), sigColorSpaceChanged(), sigLayersChangedAsync(), sigResolutionChanged(), sigSizeChanged(), KisImage::KisImagePrivate::targetOverlaySelectionMask, toQShared(), KisBaseNode::uuid(), KisImage::KisImagePrivate::width, width(), KisImage::KisImagePrivate::xres, and KisImage::KisImagePrivate::yres.
| void KisImage::cropImage | ( | const QRect & | newRect | ) |
start asynchronous operation on cropping the image
The method will drop all the image data outside newRect and resize the image to fit the new size. The GUI will get correct notification with old and new sizes, so it adjust canvas origin accordingly and avoid jumping of the canvas on screen
| newRect | the rectangle of the image which will be cut-out |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the image having new size right after this call.
Definition at line 870 of file kis_image.cc.
References resizeImageImpl().
| void KisImage::cropNode | ( | KisNodeSP | node, |
| const QRect & | newRect, | ||
| const bool | activeFrameOnly = false ) |
start asynchronous operation on cropping a subtree of nodes starting at node
The method will drop all the layer data outside newRect. Neither image nor a layer will be moved anywhere
| node | node to crop |
| newRect | the rectangle of the layer which will be cut-out |
| activeFrameOnly | whether to crop every animation frame or just the current one. |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the image having new size right after this call.
Definition at line 931 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), KisProcessingApplicator::applyVisitorAllFrames(), KisStrokeJobData::CONCURRENT, KisCropSavedExtraData::CROP_LAYER, KisSharedPtr< T >::data(), KisProcessingApplicator::end(), KisBaseNode::isAnimated(), isLayer(), kundo2_i18n(), and KisProcessingApplicator::RECURSIVE.
| void KisImage::cropNodes | ( | KisNodeList | nodes, |
| const QRect & | newRect, | ||
| const bool | activeFrameOnly = false ) |
| int KisImage::currentLevelOfDetail | ( | ) | const |
Definition at line 2549 of file kis_image.cc.
References KisUpdateScheduler::currentLevelOfDetail(), m_d, and KisImage::KisImagePrivate::scheduler.
|
overridevirtual |
Return the cookie of the lastly-installed filter
Implements KisUpdatesFacade.
Definition at line 2258 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::projectionUpdatesFilters.
| KoColor KisImage::defaultProjectionColor | ( | ) | const |
Definition at line 1801 of file kis_image.cc.
References KisImage::KisImagePrivate::colorSpace, KoColor::createTransparent(), KisGroupLayer::defaultProjectionColor(), KIS_ASSERT_RECOVER, m_d, and KisImage::KisImagePrivate::rootLayer.
|
overridevirtual |
Disables the processing of all the setDirty() requests that come to the image. The incoming requests are effectively dropped.
This feature is used by KisProcessingApplicator. For many cases it provides its own updates interface, which recalculates the whole subtree of nodes. But while we change any particular node, it can ask for an update itself. This method is a way of blocking such intermediate (and excessive) requests.
NOTE: this is a convenience function for addProjectionUpdatesFilter() that installs a predefined filter that eats everything. Please note that these calls are not recursive.
WARNING: The calls to enable/disable must be balanced.
Implements KisUpdatesFacade.
Definition at line 2265 of file kis_image.cc.
References addProjectionUpdatesFilter(), KisImage::KisImagePrivate::disabledUpdatesCookies, m_d, and toQShared().
|
overridevirtual |
Disables notification of the UI about the changes in the image. This feature is used by KisProcessingApplicator. It is needed when we change the size of the image. In this case, the whole image will be reloaded into UI by sigSizeChanged(), so there is no need to inform the UI about individual dirty rects.
The last call to enableUIUpdates() will return the list of updates that were requested while they were blocked.
Implements KisUpdatesFacade.
Definition at line 2277 of file kis_image.cc.
References KisImage::KisImagePrivate::disableUIUpdateSignals, and m_d.
| QPoint KisImage::documentToImagePixelFloored | ( | const QPointF & | documentCoord | ) | const |
Convert a document coordinate to an integer pixel coordinate rounded down.
| documentCoord | PostScript Pt coordinate to convert. |
Definition at line 1564 of file kis_image.cc.
References documentToPixel().
| QPointF KisImage::documentToPixel | ( | const QPointF & | documentCoord | ) | const |
Convert a document coordinate to a pixel coordinate.
| documentCoord | PostScript Pt coordinate to convert. |
Definition at line 1559 of file kis_image.cc.
| QRectF KisImage::documentToPixel | ( | const QRectF & | documentRect | ) | const |
Convert a document rectangle to a pixel rectangle.
| documentRect | PostScript Pt rectangle to convert. |
Definition at line 1570 of file kis_image.cc.
References documentToPixel().
| QRect KisImage::effectiveLodBounds | ( | ) | const |
Returns the actual bounds of the image, taking LevelOfDetail into account. This value is used as a bounds() value of KisDefaultBounds object.
Definition at line 1747 of file kis_image.cc.
References bounds(), currentLevelOfDetail(), and KisLodTransform::map().
|
private |
|
overridevirtual |
Implements KisUpdatesFacade.
Definition at line 2271 of file kis_image.cc.
References KisImage::KisImagePrivate::disabledUpdatesCookies, KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, and removeProjectionUpdatesFilter().
|
overridevirtual |
Implements KisUpdatesFacade.
Definition at line 2297 of file kis_image.cc.
References KisImage::KisImagePrivate::disableUIUpdateSignals, m_d, KisLocklessStack< T >::pop(), and KisImage::KisImagePrivate::savedDisabledUIUpdates.
| vKisAnnotationSP_it KisImage::endAnnotations | ( | ) |
end of an iteration over the annotations of this image
Definition at line 1883 of file kis_image.cc.
References KisImage::KisImagePrivate::annotations, and m_d.
|
overridevirtual |
Implements KisStrokesFacade.
Definition at line 2107 of file kis_image.cc.
References KisUpdateScheduler::endStroke(), m_d, and KisImage::KisImagePrivate::scheduler.
|
slot |
Explicitly start regeneration of LoD planes of all the devices in the image. This call should be performed when the user is idle, just to make the quality of image updates better.
Definition at line 2554 of file kis_image.cc.
References KisUpdateScheduler::explicitRegenerateLevelOfDetail(), KisUpdateScheduler::lodPreferences(), KisLodPreferences::lodPreferred(), KisLodPreferences::lodSupported(), m_d, and KisImage::KisImagePrivate::scheduler.
Merge all visible layers and discard hidden ones.
Definition at line 1653 of file kis_image.cc.
References KisLayerUtils::flattenImage().
| void KisImage::flattenLayer | ( | KisLayerSP | layer | ) |
flatten the layer: that is, the projection becomes the layer and all subnodes are removed. If this is not a paint layer, it will morph into a paint layer.
Definition at line 1668 of file kis_image.cc.
References KisLayerUtils::flattenLayer().
|
static |
Definition at line 341 of file kis_image.cc.
References KisNodeFacade::addNode(), KoColorSpaceRegistry::alpha8(), colorSpace(), KoColorSpaceRegistry::colorSpace(), KisPaintDevice::convertFromQImage(), KisSharedPtr< T >::data(), Float32BitsColorDepthID, KoColorSpaceRegistry::graya16(), KoColorSpaceRegistry::graya8(), KoID::id(), KoColorSpaceRegistry::instance(), KisImage(), nextLayerName(), KisPaintLayer::paintDevice, KoColorSpaceRegistry::rgb16(), KoColorSpaceRegistry::rgb8(), RGBAColorModelID, rootLayer(), and undoStore().
| KisSelectionSP KisImage::globalSelection | ( | ) | const |
Definition at line 695 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::rootLayer, KisMask::selection, and KisLayer::selectionMask().
|
slot |
A special interface that commands use to modify image's global selection
Definition at line 710 of file kis_image.cc.
References KisImage::KisImagePrivate::globalSelectionInterface, and m_d.
|
overridevirtual |
Reimplemented from KisNodeGraphListener.
Definition at line 2426 of file kis_image.cc.
References KisSharedPtr< T >::data(), m_d, and KisImage::KisImagePrivate::overlaySelectionMask.
| bool KisImage::hasOverlaySelectionMask | ( | ) | const |
Definition at line 690 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::overlaySelectionMask.
|
overridevirtual |
Implements KisUpdatesFacade.
Definition at line 2229 of file kis_image.cc.
References KisUpdateScheduler::hasUpdatesRunning(), m_d, and KisImage::KisImagePrivate::scheduler.
| qint32 KisImage::height | ( | ) | const |
Return the height of the image
Definition at line 1595 of file kis_image.cc.
References KisImage::KisImagePrivate::height, and m_d.
| void KisImage::immediateLockForReadOnly | ( | ) |
[low-level] Lock the image without waiting for all the internal job queues are processed
WARNING: Don't use it unless you really know what you are doing! Use barrierLock() instead!
Waits for all the currently running internal jobs to complete and locks the image for writing. Please note that this function does not wait for all the internal queues to process, so there might be some non-finished actions pending. It means that you just postpone these actions until you unlock() the image back. Until then, then image might easily be frozen in some inconsistent state.
The only sane usage for this function is to lock the image for emergency processing, when some internal action or scheduler got hung up, and you just want to fetch some data from the image without races.
In all other cases, please use barrierLock() instead!
Definition at line 793 of file kis_image.cc.
References KisUpdateScheduler::immediateLockForReadOnly(), KisBusyWaitBroker::instance(), KisImage::KisImagePrivate::lockCount, locked(), KisImage::KisImagePrivate::lockedForReadOnly, m_d, KisBusyWaitBroker::notifyWaitOnImageEnded(), KisBusyWaitBroker::notifyWaitOnImageStarted(), requestStrokeEnd(), and KisImage::KisImagePrivate::scheduler.
| void KisImage::initialRefreshGraph | ( | ) |
Triggers synchronous recomposition of the projection on the document opening, i.e. with the cropRect set to null. Unlimited crop rect forces the clone layers to regenerate all its sources.
WARNING: If you are not loading a multilayered document, consider using refreshGraphAsync() instead, possibly coupled with waitForDone().
NOTE: Tricky part. We set crop rect to null, so the clones will not rely on precalculated projections of their sources
Definition at line 2155 of file kis_image.cc.
References bounds(), refreshGraphAsync(), and waitForDone().
|
overridevirtual |
Reimplemented from KisNodeGraphListener.
Definition at line 632 of file kis_image.cc.
References KisTimeSpan::infinite(), and invalidateFrames().
|
overridevirtual |
Reimplemented from KisNodeGraphListener.
Definition at line 2416 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, KisImageAnimationInterface::invalidateFrames(), and m_d.
| bool KisImage::isIdle | ( | bool | allowLocked = false | ) |
Definition at line 788 of file kis_image.cc.
References KisUpdateScheduler::isIdle(), locked(), m_d, and KisImage::KisImagePrivate::scheduler.
| bool KisImage::isIsolatingGroup | ( | ) | const |
Definition at line 2096 of file kis_image.cc.
References KisImage::KisImagePrivate::isolateGroup, and m_d.
| bool KisImage::isIsolatingLayer | ( | ) | const |
Definition at line 2091 of file kis_image.cc.
References KisImage::KisImagePrivate::isolateLayer, and m_d.
| KisNodeSP KisImage::isolationRootNode | ( | ) | const |
Definition at line 2087 of file kis_image.cc.
References KisImage::KisImagePrivate::isolationRootNode, and m_d.
|
overridevirtual |
Reimplemented from KisNodeGraphListener.
Definition at line 2439 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, and m_d.
|
overridevirtual |
Inform the model that a keyframe channel has been added or removed.
Reimplemented from KisNodeGraphListener.
Definition at line 2431 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, and m_d.
|
overridevirtual |
Return the lastly executed LoD0 command. It is effectively the same as to call undoAdapter()->presentCommand();
Implements KisStrokeUndoFacade.
Definition at line 1768 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::undoStore.
| bool KisImage::locked | ( | ) | const |
When the image is locked, the user can do some modifications to the image contents safely without a perspective having race conditions with internal image jobs.
Definition at line 751 of file kis_image.cc.
References KisImage::KisImagePrivate::lockCount, and m_d.
| KisLodPreferences KisImage::lodPreferences | ( | ) | const |
Return current lod-preferences used by the strokes queue. They may differ from the preferences that has been assigned before due to multi-stage application process (due to multithreading considerations)
Definition at line 2568 of file kis_image.cc.
References KisUpdateScheduler::lodPreferences(), m_d, and KisImage::KisImagePrivate::scheduler.
| void KisImage::mergeDown | ( | KisLayerSP | l, |
| const KisMetaData::MergeStrategy * | strategy ) |
Merge the specified layer with the layer below this layer, remove the specified layer.
Definition at line 1663 of file kis_image.cc.
References KisLayerUtils::mergeDown().
Merges layers in mergedLayers and creates a new layer above putAfter
Definition at line 1658 of file kis_image.cc.
References KisLayerUtils::mergeMultipleNodes().
| QPointF KisImage::mirrorAxesCenter | ( | ) | const |
Relative position of the mirror axis center 0,0 - topleft corner of the image 1,1 - bottomright corner of the image
Definition at line 2606 of file kis_image.cc.
References KisImage::KisImagePrivate::axesCenter, and m_d.
| void KisImage::moveCompositionDown | ( | KisLayerCompositionSP | composition | ) |
Move a composition down in the composition list
Definition at line 2471 of file kis_image.cc.
References KisImage::KisImagePrivate::compositions, and m_d.
| void KisImage::moveCompositionUp | ( | KisLayerCompositionSP | composition | ) |
Move a composition up in the composition list
Definition at line 2462 of file kis_image.cc.
References KisImage::KisImagePrivate::compositions, and m_d.
| qint32 KisImage::nChildLayers | ( | ) | const |
Definition at line 1640 of file kis_image.cc.
References KisNode::childNodes(), KisCountVisitor::count(), m_d, and KisImage::KisImagePrivate::rootLayer.
| QString KisImage::nextLayerName | ( | const QString & | baseName = "" | ) | const |
Retrieve the next automatic layername (XXX: fix to add option to return Mask X)
Definition at line 715 of file kis_image.cc.
References KisLayerUtils::recursiveApplyNodes(), and KisNodeFacade::root.
| qint32 KisImage::nHiddenLayers | ( | ) | const |
Return the number of layers (not other node types) that are in this image and that are hidden.
Definition at line 1628 of file kis_image.cc.
References KisGroupLayer::accept(), KisCountVisitor::count(), m_d, KisImage::KisImagePrivate::rootLayer, and KoProperties::setProperty().
| qint32 KisImage::nlayers | ( | ) | const |
Return the number of layers (not other nodes) that are in this image.
Definition at line 1618 of file kis_image.cc.
References KisGroupLayer::accept(), KisCountVisitor::count(), m_d, and KisImage::KisImagePrivate::rootLayer.
Reimplemented from KisNodeGraphListener.
Definition at line 626 of file kis_image.cc.
References KisImageSignalRouter::emitNodeChanged(), m_d, KisNodeGraphListener::nodeChanged(), and KisImage::KisImagePrivate::signalRouter.
Reimplemented from KisNodeGraphListener.
Definition at line 2573 of file kis_image.cc.
References sigNodeCollapsedChanged().
|
overridevirtual |
Inform the model we're done adding a node.
Reimplemented from KisNodeGraphListener.
Definition at line 588 of file kis_image.cc.
References KisSharedPtr< T >::data(), KisImageSignalRouter::emitNodeHasBeenAdded(), keyframeChannelHasBeenAdded(), KisBaseNode::keyframeChannels, m_d, KisNodeGraphListener::nodeHasBeenAdded(), KisLayerUtils::recursiveApplyNodes(), SANITY_CHECK_LOCKED, KisKeyframeChannel::setNode(), and KisImage::KisImagePrivate::signalRouter.
| void KisImage::notifyAboutToBeDeleted | ( | ) |
Called before the image is deleted and sends the sigAboutToBeDeleted signal
Definition at line 1888 of file kis_image.cc.
References sigAboutToBeDeleted().
|
overridevirtual |
Notify GUI that batch update has been completed. Now GUI can start showing all of them on screen.
Implements KisUpdatesFacade.
Definition at line 2287 of file kis_image.cc.
References KisImageSignalRouter::emitNotifyBatchUpdateEnded(), m_d, and KisImage::KisImagePrivate::signalRouter.
|
overridevirtual |
Notify GUI about a bunch of updates planned. GUI is expected to wait until all the updates are completed, and render them on screen only in the very and of the batch.
Implements KisUpdatesFacade.
Definition at line 2282 of file kis_image.cc.
References KisImageSignalRouter::emitNotifyBatchUpdateStarted(), m_d, and KisImage::KisImagePrivate::signalRouter.
| void KisImage::notifyLayersChanged | ( | ) |
use if the layers have changed completely (eg. when flattening)
Definition at line 1737 of file kis_image.cc.
References KisImageSignalRouter::emitNotification(), LayersChangedSignal, m_d, and KisImage::KisImagePrivate::signalRouter.
|
overridevirtual |
Implements KisProjectionUpdateListener.
Definition at line 2311 of file kis_image.cc.
References currentLevelOfDetail(), KisImage::KisImagePrivate::disableUIUpdateSignals, KisUpdateTimeMonitor::instance(), m_d, KisLocklessStack< T >::push(), KisUpdateTimeMonitor::reportUpdateFinished(), KisImage::KisImagePrivate::savedDisabledUIUpdates, sigImageUpdated(), and KisLodTransformBase::upscaledRect().
|
overridevirtual |
Inform the model that one of the selections in the graph is changed. The sender is not passed to the function (at least for now) because the UI should decide itself whether it needs to fetch new selection of not.
The selection is calculated asynchronously, so it is not handled by disableUIUpdates() and other special signals of KisImageSignalRouter
Editing of selection masks doesn't necessary produce a setDirty() call, so in the end of the stroke we need to request direct update of the UI's cache.
Reimplemented from KisNodeGraphListener.
Definition at line 2337 of file kis_image.cc.
References bounds(), KisSharedPtr< T >::data(), KisUndoAdapter::emitSelectionChanged(), KisImage::KisImagePrivate::isolationRootNode, KisImage::KisImagePrivate::legacyUndoAdapter, m_d, and notifyProjectionUpdated().
|
overridevirtual |
Notify GUI that rect rc is now prepared in the image and GUI can read data from it.
WARNING: GUI will read the data right in the handler of this signal, so exclusive access to the area must be guaranteed by the caller.
Implements KisUpdatesFacade.
Definition at line 2292 of file kis_image.cc.
References notifyProjectionUpdated().
| KisSelectionMaskSP KisImage::overlaySelectionMask | ( | ) | const |
Definition at line 685 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::overlaySelectionMask.
| QPointF KisImage::pixelToDocument | ( | const QPoint & | pixelCoord | ) | const |
Convert an integer pixel coordinate to a document coordinate. The document coordinate is at the centre of the pixel.
| pixelCoord | pixel coordinate to convert. |
Definition at line 1580 of file kis_image.cc.
| QPointF KisImage::pixelToDocument | ( | const QPointF & | pixelCoord | ) | const |
| QRectF KisImage::pixelToDocument | ( | const QRectF & | pixelCoord | ) | const |
Convert a document rectangle to an integer pixel rectangle.
| pixelCoord | pixel coordinate to convert. |
Definition at line 1585 of file kis_image.cc.
References pixelToDocument().
|
overridevirtual |
This adapter is used by the strokes system. The commands are added to it after redo() is done (in the scheduler context). They are wrapped into a special command and added to the undo stack. redo() in not called.
Implements KisStrokeUndoFacade.
Definition at line 1760 of file kis_image.cc.
References currentLevelOfDetail(), KisUpdateScheduler::lodNPostExecutionUndoAdapter(), m_d, KisImage::KisImagePrivate::postExecutionUndoAdapter, and KisImage::KisImagePrivate::scheduler.
| const KoColorProfile * KisImage::profile | ( | ) | const |
Definition at line 1529 of file kis_image.cc.
References colorSpace(), and KoColorSpace::profile().
| KisPaintDeviceSP KisImage::projection | ( | ) | const |
Return the projection; that is, the complete, composited representation of this image.
Definition at line 1606 of file kis_image.cc.
References KisImage::KisImagePrivate::isolationRootNode, m_d, projection(), KisBaseNode::projection(), KisLayer::projection(), and KisImage::KisImagePrivate::rootLayer.
| KisProofingConfigurationSP KisImage::proofingConfiguration | ( | ) | const |
proofingConfiguration
Definition at line 2598 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::proofingConfig.
| void KisImage::purgeUnusedData | ( | bool | isCancellable | ) |
purge all pixels that have default pixel to free up memory
| isCancellable | if true, the scheduler is allower to stop and cancel purging operation as soon as the user starts any action. If isCancellable is false, then the user will not be allowed to do anything until purging operation is completed. |
WARNING: don't use this function unless you know what you are doing!
It breaks undo on layers! Therefore, after calling it, KisImage is not undo-capable anymore!
make sure we deduplicate the list to avoid concurrent write access to the devices
Definition at line 875 of file kis_image.cc.
References KritaUtils::addJobConcurrent(), KisStrokeJobData::BARRIER, KisSharedPtr< T >::data(), endStroke(), KisStrokeJobData::EXCLUSIVE, kundo2_noi18n(), KritaUtils::makeContainerUnique(), KisPaintDevice::purgeDefaultPixels(), KisLayerUtils::recursiveApplyNodes(), and startStroke().
| void KisUpdatesFacade::refreshGraphAsync | ( | KisNodeSP | root, |
| const QRect & | rc, | ||
| const QRect & | cropRect, | ||
| KisProjectionUpdateFlags | flags = KisProjectionUpdateFlag::None ) |
Definition at line 54 of file kis_image_interfaces.cpp.
| void KisUpdatesFacade::refreshGraphAsync | ( | KisNodeSP | root, |
| const QRect & | rc, | ||
| KisProjectionUpdateFlags | flags = KisProjectionUpdateFlag::None ) |
Definition at line 53 of file kis_image_interfaces.cpp.
|
virtual |
Implements KisUpdatesFacade.
|
overridevirtual |
We cannot regenerate a pass-through group, since it is not present in the layers stack. Instead we should delegate this regeneration pass to the parent group.
We should also take into account the change rect of all the layers that lay above the "dirty" pass-through group (i.e. convert the change rect of the child into a change rect of the parent). That is required for a case, when there are adjustment layers laying above the pass-through group.
We iterate through the filters in a reversed way. It makes the most nested filters to execute first.
Implements KisUpdatesFacade.
Definition at line 2166 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, KisWeakSharedPtr< T >::data(), DontInvalidateFrames, KisUpdateScheduler::fullRefreshAsync(), KIS_SAFE_ASSERT_RECOVER, KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisNode::N_ABOVE_FILTHY, KisNode::N_FILTHY, KisImageAnimationInterface::notifyNodeChanged(), KisNode::parent, KisGroupLayer::passThroughMode, KisNode::projectionLeaf, KisImage::KisImagePrivate::projectionUpdatesFilters, KisNodeFacade::root, KisImage::KisImagePrivate::rootLayer, and KisImage::KisImagePrivate::scheduler.
| void KisUpdatesFacade::refreshGraphAsync | ( | KisNodeSP | root = nullptr, |
| KisProjectionUpdateFlags | flags = KisProjectionUpdateFlag::None ) |
Definition at line 52 of file kis_image_interfaces.cpp.
| void KisImage::removeAnnotation | ( | const QString & | type | ) |
delete the annotation, if the image contains it
Definition at line 1865 of file kis_image.cc.
References KisImage::KisImagePrivate::annotations, m_d, and setModifiedWithoutUndo().
| void KisImage::removeComposition | ( | KisLayerCompositionSP | composition | ) |
Remove the layer composition
Definition at line 2457 of file kis_image.cc.
References KisImage::KisImagePrivate::compositions, and m_d.
|
overridevirtual |
removes already installed filter from the stack of updates filers
| cookie | a cookie object returned by addProjectionUpdatesFilter() on installation |
NOTE: some weird code (e.g. KisRegenerateFrameStrokeStrategy) needs to temporary remove all the filters and then install them back. Current implementation ensures that after removal and the following installation, cookies will be preserved. So this operation is considered safe.
Implements KisUpdatesFacade.
Definition at line 2243 of file kis_image.cc.
References KIS_SAFE_ASSERT_RECOVER_NOOP, KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, m_d, and KisImage::KisImagePrivate::projectionUpdatesFilters.
|
overridevirtual |
Inform the model that a node has been changed (setDirty)
We iterate through the filters in a reversed way. It makes the most nested filters to execute first.
Here we use 'permitted' instead of 'active' intentively, because the updates may come after the actual stroke has been finished. And having some more updates for the stroke not supporting the wrap-around mode will not make much harm.
TODO: Remove the no-filthy condition. I have no idea, why it is present. Or replace it with an assert. (DK)
Reimplemented from KisNodeGraphListener.
Definition at line 2369 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, bounds(), DontInvalidateFrames, effectiveLodBounds(), KIS_SAFE_ASSERT_RECOVER, m_d, NoFilthy, KisImageAnimationInterface::notifyNodeChanged(), KisImage::KisImagePrivate::projectionUpdatesFilters, KisNodeGraphListener::requestProjectionUpdate(), KisImage::KisImagePrivate::requestProjectionUpdateImpl(), KisImage::KisImagePrivate::wrapAroundModeAxis, and KisImage::KisImagePrivate::wrapAroundModePermitted.
|
slot |
This method is called by the UI (not by the creator of the stroke) when it thinks the current stroke should redo its last undo, for example, when the user presses Ctrl+Shift+Z while some stroke is active.
If the creator of the stroke supports undoing/redoing of an intermediate actions, it will be notified about this request and can undo its last action.
Definition at line 2127 of file kis_image.cc.
References sigRedoDuringStrokeRequested().
|
slot |
This method is called by the UI (not by the creator of the stroke) when it thinks current stroke should be cancelled. If there is a running stroke that has already been detached from its creator (ended or cancelled), it will be forcefully cancelled and reverted. If there is an open stroke present, and if its creator supports cancelling, it will be notified about the request and the stroke will be cancelled
Definition at line 2132 of file kis_image.cc.
References m_d, sigStrokeCancellationRequested(), and KisImage::KisImagePrivate::tryCancelCurrentStrokeAsync().
|
slot |
This method is called when image or some other part of Krita (not the creator of the stroke) decides that the stroke should be ended. If the creator of the stroke supports it, it will be notified and the stroke will be cancelled
Definition at line 2144 of file kis_image.cc.
References sigStrokeEndRequested(), and sigStrokeEndRequestedActiveNodeFiltered().
|
slot |
Same as requestStrokeEnd() but is called by view manager when the current node is changed. Use to distinguish sigStrokeEndRequested() and sigStrokeEndRequestedActiveNodeFiltered() which are used by KisNodeJugglerCompressed
Definition at line 2150 of file kis_image.cc.
References sigStrokeEndRequested().
|
overridevirtual |
Reimplemented from KisNodeGraphListener.
Definition at line 2421 of file kis_image.cc.
References KisImage::KisImagePrivate::animationInterface, m_d, and KisImageAnimationInterface::requestTimeSwitchNonGUI().
|
slot |
This method is called by the UI (not by the creator of the stroke) when it thinks the current stroke should undo its last action, for example, when the user presses Ctrl+Z while some stroke is active.
If the creator of the stroke supports undoing of intermediate actions, it will be notified about this request and can undo its last action.
Definition at line 2122 of file kis_image.cc.
References sigUndoDuringStrokeRequested().
| void KisImage::resizeImage | ( | const QRect & | newRect | ) |
start asynchronous operation on resizing the image
The method will resize the image to fit the new size without dropping any pixel data. The GUI will get correct notification with old and new sizes, so it adjust canvas origin accordingly and avoid jumping of the canvas on screen
| newRect | the rectangle of the image which will be visible after operation is completed |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the image having new size right after this call.
Definition at line 865 of file kis_image.cc.
References resizeImageImpl().
|
private |
Definition at line 834 of file kis_image.cc.
References bounds(), KisStrokeJobData::CONCURRENT, KisCropSavedExtraData::CROP_IMAGE, KisImageResizeCommand, kundo2_i18n(), m_d, KisProcessingApplicator::NO_UI_UPDATES, KisProcessingApplicator::RECURSIVE, KisCropSavedExtraData::RESIZE_IMAGE, and KisImage::KisImagePrivate::rootLayer.
| KisGroupLayerSP KisImage::rootLayer | ( | ) | const |
Definition at line 1600 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::rootLayer.
| void KisImage::rotateImage | ( | double | radians | ) |
start asynchronous operation on rotating the image
The image is resized to fit the rotated rectangle
| radians | rotation angle in radians |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the operation being completed right after the call
Definition at line 1161 of file kis_image.cc.
References kundo2_i18n(), KisNodeFacade::root, and rotateImpl().
|
private |
Definition at line 1069 of file kis_image.cc.
References KisProcessingApplicator::applyCommand(), KisProcessingApplicator::applyVisitor(), KisProcessingApplicator::applyVisitorAllFrames(), bounds(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), KisBaseNode::exactBounds(), KisFilterStrategyRegistry::instance(), KIS_SAFE_ASSERT_RECOVER, KisImageResizeCommand, KisProcessingApplicator::NO_UI_UPDATES, KisProcessingApplicator::NONE, KisProcessingApplicator::RECURSIVE, resizeImage(), KisSelection::selectedExactRect(), KisTransformProcessingVisitor::setSelection(), size(), KisTransformWorker::transform(), and KoGenericRegistry< T >::value().
|
private |
Definition at line 1061 of file kis_image.cc.
References resizeImage(), and rotateImpl().
| void KisImage::rotateNode | ( | KisNodeSP | node, |
| double | radians, | ||
| KisSelectionSP | selection ) |
start asynchronous operation on rotating a subtree of nodes starting at node
The image is not resized!
| node | the root of the subtree to rotate |
| radians | rotation angle in radians |
| selection | the selection we based on |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the operation being completed right after the call
Definition at line 1166 of file kis_image.cc.
References rotateNodes().
| void KisImage::rotateNodes | ( | KisNodeList | nodes, |
| double | radians, | ||
| KisSelectionSP | selection ) |
Definition at line 1170 of file kis_image.cc.
References kundo2_i18n(), kundo2_i18np(), and rotateImpl().
| void KisImage::scaleImage | ( | const QSize & | size, |
| qreal | xres, | ||
| qreal | yres, | ||
| KisFilterStrategy * | filterStrategy ) |
start asynchronous operation on scaling the image
| size | new image size in pixels |
| xres | new image x-resolution pixels-per-pt |
| yres | new image y-resolution pixels-per-pt |
| filterStrategy | filtering strategy |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the image having new size right after this call.
Definition at line 961 of file kis_image.cc.
References KisProcessingApplicator::applyCommand(), KisProcessingApplicator::applyVisitorAllFrames(), bounds(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), KisImageResizeCommand, kundo2_i18n(), m_d, KisProcessingApplicator::NO_UI_UPDATES, KisProcessingApplicator::NONE, qFuzzyCompare(), KisProcessingApplicator::RECURSIVE, ResolutionChangedSignal, KisImage::KisImagePrivate::rootLayer, size(), xRes(), and yRes().
| void KisImage::scaleNode | ( | KisNodeSP | node, |
| const QPointF & | center, | ||
| qreal | scaleX, | ||
| qreal | scaleY, | ||
| KisFilterStrategy * | filterStrategy, | ||
| KisSelectionSP | selection ) |
start asynchronous operation on scaling a subtree of nodes starting at node
| node | node to scale |
| center | the center of the scaling |
| scaleX | x-scale coefficient to be applied to the node |
| scaleY | y-scale coefficient to be applied to the node |
| filterStrategy | filtering strategy |
| selection | the selection we based on |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the image having new size right after this call.
Definition at line 1018 of file kis_image.cc.
References scaleNodes().
| void KisImage::scaleNodes | ( | KisNodeList | nodes, |
| const QPointF & | center, | ||
| qreal | scaleX, | ||
| qreal | scaleY, | ||
| KisFilterStrategy * | filterStrategy, | ||
| KisSelectionSP | selection ) |
Definition at line 1022 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), KisProcessingApplicator::applyVisitorAllFrames(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), kundo2_i18np(), KisProcessingApplicator::RECURSIVE, KisTransformProcessingVisitor::setSelection(), and KisTransformWorker::transform().
| void KisImage::setAllowMasksOnRootNode | ( | bool | value | ) |
Configure the image to allow masks on the root not (as reported by root()->allowAsChild()). By default it is not allowed (because it looks weird from GUI point of view)
Definition at line 2616 of file kis_image.cc.
References KisImage::KisImagePrivate::allowMasksOnRootNode, m_d, and value().
Sets the default color of the root layer projection. All the layers will be merged on top of this very color
Definition at line 1795 of file kis_image.cc.
References KIS_ASSERT_RECOVER_RETURN, m_d, KisImage::KisImagePrivate::rootLayer, and KisGroupLayer::setDefaultProjectionColor().
| void KisImage::setLodPreferences | ( | const KisLodPreferences & | value | ) |
Set preferences for the level-of-detail functionality. Due to multithreading considerations they may be applied not immediately, but some time later.
Definition at line 2563 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, KisUpdateScheduler::setLodPreferences(), and value().
| void KisImage::setMirrorAxesCenter | ( | const QPointF & | value | ) | const |
Sets the relative position of the axes center
Definition at line 2611 of file kis_image.cc.
References KisImage::KisImagePrivate::axesCenter, m_d, and value().
| void KisImage::setModifiedWithoutUndo | ( | ) |
Tell the image it's modified without creation of an undo command. It may happen when e.g. layer visibility has changed.
This function emits both, sigImageModified() and sigImageModifiedWithoutUndo()
For normal modifications with undo information the signal emission is triggered by the undo stack
Definition at line 1673 of file kis_image.cc.
References KisImageSignalRouter::emitNotification(), m_d, ModifiedWithoutUndoSignal, sigImageModified(), and KisImage::KisImagePrivate::signalRouter.
| void KisImage::setOverlaySelectionMask | ( | KisSelectionMaskSP | mask | ) |
Sets the mask (it must be a part of the node hierarchy already) to be painted on the top of all layers. This method does all the locking and syncing for you. It is executed asynchronously.
Definition at line 637 of file kis_image.cc.
References KisStrokeJobData::BARRIER, endStroke(), KisStrokeJobData::EXCLUSIVE, KisSelectionMask::extent(), KisNode::graphListener, KIS_SAFE_ASSERT_RECOVER_RETURN, kundo2_noi18n(), m_d, KisSelectionMask::m_d, KisSelectionMask::setDirty(), startStroke(), and KisImage::KisImagePrivate::targetOverlaySelectionMask.
|
private |
Definition at line 1519 of file kis_image.cc.
References KisImage::KisImagePrivate::colorSpace, colorSpace(), and m_d.
| void KisImage::setProofingConfiguration | ( | KisProofingConfigurationSP | proofingConfig | ) |
setProofingConfiguration, this sets the image's proofing configuration, and signals the proofingConfiguration has changed.
| proofingConfig | - the kis proofing config that will be used instead. |
Definition at line 2584 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::proofingConfig, and sigProofingConfigChanged().
| void KisImage::setResolution | ( | double | xres, |
| double | yres ) |
Set the resolution in pixels per pt.
Definition at line 1544 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::xres, and KisImage::KisImagePrivate::yres.
| void KisImage::setRootLayer | ( | KisGroupLayerSP | rootLayer | ) |
Definition at line 1810 of file kis_image.cc.
References KisImage::KisImagePrivate::colorSpace, KoColor::createTransparent(), KisSharedPtr< T >::data(), KisPaintDevice::defaultPixel(), defaultProjectionColor(), m_d, KisGroupLayer::original(), KisImage::KisImagePrivate::rootLayer, rootLayer(), setDefaultProjectionColor(), KisNode::setGraphListener(), KisGroupLayer::setImage(), KisNodeFacade::setRoot(), and sigInternalStopIsolatedModeRequested().
|
private |
Definition at line 828 of file kis_image.cc.
References KisImage::KisImagePrivate::height, m_d, size(), and KisImage::KisImagePrivate::width.
| void KisImage::setUndoStore | ( | KisUndoStore * | undoStore | ) |
Replace current undo store with the new one. The old store will be deleted. This method is used by KisDocument for dropping all the commands during file loading.
Definition at line 1773 of file kis_image.cc.
References connect(), KisImage::KisImagePrivate::legacyUndoAdapter, m_d, KisImage::KisImagePrivate::postExecutionUndoAdapter, KisPostExecutionUndoAdapter::setUndoStore(), KisUndoAdapter::setUndoStore(), KisImage::KisImagePrivate::signalRouter, KisImage::KisImagePrivate::undoStore, and undoStore().
| void KisImage::setWorkingThreadsLimit | ( | int | value | ) |
Set the number of threads used by the image's working threads
Definition at line 2327 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, KisUpdateScheduler::setThreadsLimit(), and value().
| void KisImage::setWrapAroundModeAxis | ( | WrapAroundAxis | value | ) |
Set which axis to use for wraparound mode
Definition at line 2527 of file kis_image.cc.
References m_d, value(), and KisImage::KisImagePrivate::wrapAroundModeAxis.
| void KisImage::setWrapAroundModePermitted | ( | bool | value | ) |
Permit or deny the wrap-around mode for all the paint devices of the image. Note that permitting the wraparound mode will not necessarily activate it right now. To be activated the wrap around mode should be 1) permitted; 2) supported by the currently running stroke.
Definition at line 2503 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), bounds(), checkMasksNeedConversion(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), kundo2_i18n(), m_d, KisProcessingApplicator::RECURSIVE, requestStrokeEnd(), KisNodeFacade::root, value(), and KisImage::KisImagePrivate::wrapAroundModePermitted.
| void KisImage::shear | ( | double | angleX, |
| double | angleY ) |
start asynchronous operation on shearing the image
The image is resized to fit the sheared polygon
angleX, angleY are given in degrees.
Please note that the actual operation starts asynchronously in a background, so you cannot expect the operation being completed right after the call
Definition at line 1286 of file kis_image.cc.
References kundo2_i18n(), m_d, KisImage::KisImagePrivate::rootLayer, and shearImpl().
|
private |
Definition at line 1188 of file kis_image.cc.
References KisProcessingApplicator::applyCommand(), KisProcessingApplicator::applyVisitor(), KisProcessingApplicator::applyVisitorAllFrames(), bounds(), KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), KisBaseNode::exactBounds(), KisFilterStrategyRegistry::instance(), KisImageResizeCommand, KisProcessingApplicator::NO_UI_UPDATES, KisProcessingApplicator::RECURSIVE, resizeImage(), KisSelection::selectedExactRect(), KisTransformProcessingVisitor::setSelection(), KisTransformWorker::transform(), and KoGenericRegistry< T >::value().
|
private |
Definition at line 1180 of file kis_image.cc.
References resizeImage(), and shearImpl().
| void KisImage::shearNode | ( | KisNodeSP | node, |
| double | angleX, | ||
| double | angleY, | ||
| KisSelectionSP | selection ) |
start asynchronous operation on shearing a subtree of nodes starting at node
The image is not resized!
| node | the root of the subtree to rotate |
| angleX | x-shear given in degrees. |
| angleY | y-shear given in degrees. |
| selection | the selection we based on |
Please note that the actual operation starts asynchronously in a background, so you cannot expect the operation being completed right after the call
Definition at line 1270 of file kis_image.cc.
References shearNodes().
| void KisImage::shearNodes | ( | KisNodeList | nodes, |
| double | angleX, | ||
| double | angleY, | ||
| KisSelectionSP | selection ) |
Definition at line 1274 of file kis_image.cc.
References kundo2_i18n(), kundo2_i18np(), and shearImpl().
|
signal |
Inform that the image is going to be deleted
|
signal |
|
signal |
Emitted whenever the image has been modified, so that it doesn't match with the version saved on disk.
|
signal |
Emitted whenever the image has been modified without creation of an undo command
|
signal |
Emitted whenever an action has caused the image to be recomposited. Parameter is the rect that has been recomposited.
|
signal |
Internal signal for asynchronously requesting isolated mode to stop. Don't use it outside KisImage, use sigIsolatedModeChanged() instead.
|
signal |
Emitted when the isolated mode status has changed.
Can be used by the receivers to catch a fact of forcefully stopping the isolated mode by the image when some complex action was requested
|
signal |
Emitted when the root node of the image has changed. It happens, e.g. when we flatten the image. When this happens the receiver should reload information about the image
| KisImageSignalRouter * KisImage::signalRouter | ( | ) |
Definition at line 1893 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::signalRouter.
The signal is emitted right after a node has been connected to the graph of the nodes.
WARNING: you must not request any graph-related information about the node being run in a not-scheduler thread. If you need information about the parent/siblings of the node connect with Qt::DirectConnection, get needed information and then Q_EMIT another Qt::AutoConnection signal to pass this information to your thread. See details of the implementation in KisDummiesfacadeBase.
|
signal |
Emitted when one or more nodes changed the collapsed state
|
signal |
|
signal |
Emitted when the proofing configuration of the image is being changed.
|
signal |
Emitted when the UI has requested the redo of the last undo operation.
If your tool supports undoing/redoing part of its work, just listen to this signal and undo when it comes
This signal is emitted right before a node is going to removed from the graph of the nodes.
WARNING: you must not request any graph-related information about the node being run in a not-scheduler thread.
|
signal |
|
signal |
|
signal |
The signal is emitted when the size of the image is changed. oldStillPoint and newStillPoint give the receiver the hint about how the new and old rect of the image correspond to each other. They specify the point of the image around which the conversion was done. This point will stay still on the user's screen. That is the newStillPoint of the new image will be painted at the same screen position, where oldStillPoint of the old image was painted.
| oldStillPoint | is a still point represented in old image coordinates |
| newStillPoint | is a still point represented in new image coordinates |
|
signal |
Emitted when the UI has requested the cancellation of the stroke. The point is, we cannot cancel the stroke without its creator knowing about it (which most probably cause a crash), so we just forward this request from the UI to the creator of the stroke.
If your tool supports cancelling of its work in the middle of operation, just listen to this signal and cancel the stroke when it comes
|
signal |
Emitted when the image decides that the stroke should better be ended. The point is, we cannot just end the stroke without its creator knowing about it (which most probably cause a crash), so we just forward this request from the UI to the creator of the stroke.
If your tool supports long strokes that may involve multiple mouse actions in one stroke, just listen to this signal and end the stroke when it comes.
|
signal |
Same as sigStrokeEndRequested() but is not emitted when the active node is changed.
|
signal |
Emitted when the UI has requested the undo of the last stroke's operation. The point is, we cannot deal with the internals of the stroke without its creator knowing about it (which most probably cause a crash), so we just forward this request from the UI to the creator of the stroke.
If your tool supports undoing part of its work, just listen to this signal and undo when it comes
|
inline |
Return the size of the image
Definition at line 547 of file kis_image.h.
| bool KisImage::startIsolatedMode | ( | KisNodeSP | node, |
| bool | isolateLayer, | ||
| bool | isolateGroup ) |
Isolation of transform masks is not possible, so we should not allow that
Definition at line 1938 of file kis_image.cc.
References KisStrokeJobData::BARRIER, endStroke(), KisStrokeJobData::EXCLUSIVE, KisImage::KisImagePrivate::isolateGroup, KisImage::KisImagePrivate::isolateLayer, kundo2_noi18n(), m_d, KisBaseNode::projection(), KisStrokeJobData::SEQUENTIAL, and startStroke().
|
overridevirtual |
Ask open strokes to end gracefully. All the strokes clients (including the one calling this method right now) will get a notification that they should probably end their strokes. However this is purely their choice whether to end a stroke or not.
Implements KisStrokesFacade.
Definition at line 1906 of file kis_image.cc.
References m_d, KisStrokeStrategy::requestsOtherStrokesToEnd(), requestStrokeEnd(), KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::startStroke().
|
slot |
Definition at line 2026 of file kis_image.cc.
References KisStrokeJobData::BARRIER, endStroke(), KisImage::KisImagePrivate::isolationRootNode, kundo2_noi18n(), m_d, and startStroke().
| bool KisImage::tryBarrierLock | ( | bool | readOnly = false | ) |
Tries to lock the image without waiting for the jobs to finish.
Same as barrierLock(), but doesn't block execution of the calling thread until all the background jobs are finished. Instead, in case of presence of unfinished jobs in the queue, it just returns false
Definition at line 771 of file kis_image.cc.
References KisImage::KisImagePrivate::lockCount, locked(), KisImage::KisImagePrivate::lockedForReadOnly, m_d, KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::tryBarrierLock().
|
slot |
This method requests the last stroke executed on the image to become undone. If the stroke is not ended, or if all the Lod0 strokes are completed, the method returns UNDO_FAIL. If the last Lod0 is going to be finished soon, then UNDO_WAIT is returned and the caller should just wait for its completion and call global undo instead. UNDO_OK means one unfinished stroke has been undone.
Definition at line 2139 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::tryUndoLastStrokeAsync().
|
overridevirtual |
unblockUpdates unblock updating the image project. This only restarts the scheduler and does not schedule a full refresh.
Implements KisUpdatesFacade.
Definition at line 823 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::unblockUpdates().
| KisUndoAdapter * KisImage::undoAdapter | ( | ) | const |
Returns the current undo adapter. You can add new commands to the undo stack using the adapter. This adapter is used for a backward compatibility for old commands created before strokes. It blocks all the processing at the scheduler, waits until it's finished and executes commands exclusively.
Definition at line 1790 of file kis_image.cc.
References KisImage::KisImagePrivate::legacyUndoAdapter, and m_d.
| KisUndoStore * KisImage::undoStore | ( | ) |
Return current undo store of the image
Definition at line 1785 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::undoStore.
| void KisImage::unifyLayersColorSpace | ( | ) |
Unify layers color space
If any of the layers have color space different from the image color space, convert them into the image color space.
Definition at line 1408 of file kis_image.cc.
References KisProcessingApplicator::applyVisitor(), KisImage::KisImagePrivate::colorSpace, KisStrokeJobData::CONCURRENT, KisProcessingApplicator::end(), KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), kundo2_i18n(), m_d, KisProcessingApplicator::NO_UI_UPDATES, KisProcessingApplicator::RECURSIVE, and KisImage::KisImagePrivate::rootLayer.
| void KisImage::unlock | ( | ) |
Unlocks the image and starts/resumes all the pending internal jobs. If the image has been locked for a non-readOnly access, then all the internal caches of the image (e.g. lod-planes) are reset and regeneration jobs are scheduled.
Definition at line 805 of file kis_image.cc.
References KisImage::KisImagePrivate::lockCount, locked(), KisImage::KisImagePrivate::lockedForReadOnly, m_d, KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::unlock().
| void KisImage::waitForDone | ( | ) |
Wait for all the internal image jobs to complete and return without locking the image. This function is handy for tests or other synchronous actions, when one needs to wait for the result of his actions.
Definition at line 1898 of file kis_image.cc.
References KisBusyWaitBroker::instance(), m_d, KisBusyWaitBroker::notifyWaitOnImageEnded(), KisBusyWaitBroker::notifyWaitOnImageStarted(), requestStrokeEnd(), KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::waitForDone().
| qint32 KisImage::width | ( | ) | const |
Return the width of the image
Definition at line 1590 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::width.
| int KisImage::workingThreadsLimit | ( | ) | const |
Return the number of threads available to the image's working threads
Definition at line 2332 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, and KisUpdateScheduler::threadsLimit().
| bool KisImage::wrapAroundModeActive | ( | ) | const |
Definition at line 2543 of file kis_image.cc.
References m_d, KisImage::KisImagePrivate::scheduler, KisImage::KisImagePrivate::wrapAroundModePermitted, and KisUpdateScheduler::wrapAroundModeSupported().
| WrapAroundAxis KisImage::wrapAroundModeAxis | ( | ) | const |
Definition at line 2532 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::wrapAroundModeAxis.
| bool KisImage::wrapAroundModePermitted | ( | ) | const |
Definition at line 2538 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::wrapAroundModePermitted.
| double KisImage::xRes | ( | ) | const |
X resolution in pixels per pt
Definition at line 1534 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::xres.
| double KisImage::yRes | ( | ) | const |
Y resolution in pixels per pt
Definition at line 1539 of file kis_image.cc.
References m_d, and KisImage::KisImagePrivate::yres.
|
friend |
Definition at line 1271 of file kis_image.h.
|
friend |
Definition at line 1266 of file kis_image.h.
|
private |
Definition at line 1275 of file kis_image.h.