Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCanvas2 Class Reference

#include <kis_canvas2.h>

+ Inheritance diagram for KisCanvas2:

Classes

struct  CanvasInputActionGroupsMaskInterface
 

Public Slots

void channelSelectionChanged ()
 
void finishResizingImage (qint32 w, qint32 h)
 
qreal rotationAngle () const
 canvas rotation in degrees
 
void slotChangeGlobalProofingConfig ()
 
void slotChangeProofingConfig ()
 
void slotConfigChanged ()
 
void slotGamutCheck ()
 
void slotPopupPaletteRequestedZoomChange (int zoom)
 
void slotScreenChanged (QScreen *screen)
 
void slotSoftProofing ()
 
void slotTrySwitchShapeManager ()
 
void startResizingImage ()
 
void startUpdateInPatches (const QRect &imageRect)
 
void updateCanvas ()
 Update the entire canvas area.
 
void updateCanvasDecorations ()
 
void updateCanvasDecorations (const QRectF &docRect)
 
void updateCanvasProjection (const QRectF &docRect)
 
void updateCanvasScene ()
 
void updateCanvasToolOutlineDoc (const QRectF &docRect)
 
void updateCanvasToolOutlineWdg (const QRect &widgetRect)
 
bool xAxisMirrored () const
 Bools indicating canvasmirroring.
 
bool yAxisMirrored () const
 

Signals

void sigCanvasCacheUpdated ()
 
void sigCanvasEngineChanged ()
 
void sigCanvasStateChanged ()
 
void sigContinueResizeImage (qint32 w, qint32 h)
 
void sigRegionOfInterestChanged (const QRect &roi)
 
void updateCanvasRequested (const QRect &rc)
 

Public Member Functions

void addCommand (KUndo2Command *command) override
 
void addDecoration (KisCanvasDecorationSP deco)
 
KisCanvasAnimationStateanimationState () const
 
void assignChangedMultiSurfaceState (const KisMultiSurfaceStateManager::State &newState)
 
void assignChangedMultiSurfaceStateSkipCanvasSurface (const KisMultiSurfaceStateManager::State &newState)
 
bool canvasIsOpenGL () const override
 
const QWidget * canvasWidget () const override
 
QWidget * canvasWidget () override
 
QString colorManagementReport () const
 
const KisCoordinatesConvertercoordinatesConverter () const
 
KisImageWSP currentImage () const
 
int currentScreenId () const
 
KoShapecurrentShapeManagerOwnerShape () const override
 the shape that owns the currently active shape manager
 
KisCanvasDecorationSP decoration (const QString &id) const
 
void disconnectCanvasObserver (QObject *object) override
 
void disconnectImage ()
 
KisDisplayColorConverterdisplayColorConverter () const
 
QSharedPointer< KisDisplayFilterdisplayFilter () const
 
QPoint documentOffset () const
 
QPoint documentOrigin () const override
 
QRect docUpdateRectToWidget (const QRectF &docRect)
 
bool effectiveLodAllowedInImage () const
 
KisExposureGammaCorrectionInterfaceexposureGammaCorrectionInterface () const
 
void fetchProofingOptions ()
 fetchProofingOptions Get the options for softproofing, and apply the view-specific state without affecting the proofing options as stored inside the image.
 
KisAnimationFrameCacheSP frameCache () const
 
KisInputManagerglobalInputManager () const
 
KoShapeManagerglobalShapeManager () const
 
void gridSize (QPointF *offset, QSizeF *spacing) const override
 
KisImageWSP image () const
 
QPointer< KisViewimageView () const
 
void initializeImage ()
 
KisInputActionGroupsMaskInterface::SharedInterface inputActionGroupsMaskInterface ()
 
 KisCanvas2 (KisCoordinatesConverter *coordConverter, KoCanvasResourceProvider *resourceManager, KisMainWindow *mainWindow, KisView *view, KoShapeControllerBase *sc)
 
 KisCanvas2Private (KisCanvas2 *parent, KisCoordinatesConverter *coordConverter, QPointer< KisView > view, KoCanvasResourceProvider *resourceManager)
 
KoShapeManagerlocalShapeManager () const
 
bool lodIsSupported () const
 
bool lodPreferredInCanvas () const
 
KisOpenGL::FilterMode openGLFilterMode () const
 
KisPaintingAssistantsDecorationSP paintingAssistantsDecoration () const
 
KisPopupPalettepopupPalette ()
 
bool proofingConfigUpdated ()
 proofingConfigUpdated ask the canvas whether or not it updated the proofing config.
 
KisProofingConfigurationSP proofingConfiguration () const
 
KisReferenceImagesDecorationSP referenceImagesDecoration () const
 
void refetchDataFromImage ()
 
QRect regionOfInterest () const
 
QRect renderingLimit () const
 
KoSelectedShapesProxyselectedShapesProxy () const override
 
void setActiveShapeManager (KoShapeManager *shapeManager)
 
void setCurrentShapeManagerOwnerShape (KoShape *source) override
 sets the group shape that is supposed to be "entered"
 
void setCursor (const QCursor &cursor) override
 
void setDisplayFilter (QSharedPointer< KisDisplayFilter > displayFilter)
 
void setFavoriteResourceManager (KisFavoriteResourceManager *favoriteResourceManager)
 
void setLodPreferredInCanvas (bool value)
 
void setProofingConfigUpdated (bool updated)
 setProofingConfigUpdated This function is to set whether the proofing config is updated, this is needed for determining whether or not to generate a new proofing transform.
 
void setRenderingLimit (const QRect &rc)
 
void setWrapAroundViewingMode (bool value)
 
void setWrapAroundViewingModeAxis (WrapAroundAxis value)
 
KoShapeManagershapeManager () const override
 
bool snapToGrid () const override
 
KoToolProxytoolProxy () const override
 
KoUnit unit () const override
 
void updateCanvas (const QRectF &rc) override
 
void updateProofingState ()
 
const KoViewConverterviewConverter () const override
 
KoViewConverterviewConverter () override
 
KisViewManagerviewManager () const
 
bool wrapAroundViewingMode () const
 
WrapAroundAxis wrapAroundViewingModeAxis () const
 
 ~KisCanvas2 () override
 
 ~KisCanvas2Private ()
 
- Public Member Functions inherited from KoCanvasBase
KoCanvasControllercanvasController () const
 
virtual void clipToDocument (const KoShape *shape, QPointF &move) const
 
 KoCanvasBase (KoShapeControllerBase *shapeController, KoCanvasResourceProvider *sharedResourceManager=0)
 
 Private ()
 
KoCanvasResourceProviderresourceManager () const
 
void setCanvasController (KoCanvasController *controller)
 called by KoCanvasController to set the controller that handles this canvas.
 
KoShapeControllershapeController () const
 
KoSnapGuidesnapGuide () const
 
virtual QPointF viewToDocument (const QPointF &viewPoint) const
 
 ~KoCanvasBase () override
 
 ~Private ()
 

Public Attributes

QScopedPointer< KisCanvasAnimationStateanimationPlayer
 
bool bootstrapLodBlocked = false
 
KisSignalCompressor canvasUpdateCompressor
 
KisAbstractCanvasWidgetcanvasWidget = 0
 
QBitArray channelFlags
 
KisCoordinatesConvertercoordinatesConverter = 0
 
bool currentCanvasIsOpenGL = true
 
QPointer< KoShapeManagercurrentlyActiveShapeManager
 
KisDisplayColorConverter displayColorConverter
 
KisAnimationFrameCacheSP frameCache
 
KisSignalCompressor frameRenderStartCompressor
 
std::optional< ShapeLifetimeWrapper > groupModeShapeWrapper
 
KisInputActionGroupsMask inputActionGroupsMask = AllActionGroup
 
QSharedPointer< CanvasInputActionGroupsMaskInterfaceinputActionGroupsMaskInterface
 
int isBatchUpdateActive = 0
 
bool lodPreferredInImage = false
 
KisMultiSurfaceStateManager multiSurfaceSetupManager
 
std::optional< KisMultiSurfaceStateManager::StatemultiSurfaceState
 
int openGLFilterMode = 0
 
KisPopupPalettepopupPalette = 0
 
KisPrescaledProjectionSP prescaledProjection
 
KisCanvasUpdatesCompressor projectionUpdatesCompressor
 
KisProofingConfigurationSP proofingConfig
 
bool proofingConfigUpdated = false
 
KisCanvas2q = 0
 
KisSignalCompressor referencesBoundsUpdateCompressor
 
QRect regionOfInterest
 
qreal regionOfInterestMargin = 0.25
 
KisSignalCompressor regionOfInterestUpdateCompressor
 
QRect renderingLimit
 
QRect savedCanvasProjectionUpdateRect
 
QRect savedOverlayUpdateRect
 
KisSelectedShapesProxy selectedShapesProxy
 
KoShapeManager shapeManager
 
KisToolProxy toolProxy
 
bool updateSceneRequested = false
 
QPointer< KisViewview
 
- Public Attributes inherited from KoCanvasBase
KoCanvasControllercontroller
 
bool isResourceManagerShared
 
QPointer< KoCanvasResourceProviderresourceManager
 
QPointer< KoShapeControllershapeController
 
KoSnapGuidesnapGuide
 

Private Slots

void bootstrapFinished ()
 
void slotBeginUpdatesBatch ()
 
void slotCanvasStateChanged ()
 
void slotDoCanvasUpdate ()
 
void slotEffectiveZoomChanged (qreal newZoom)
 
void slotEndUpdatesBatch ()
 
void slotImageColorSpaceChanged ()
 
void slotSelectionChanged ()
 
void slotSetLodUpdatesBlocked (bool value)
 
void slotUpdateReferencesBounds ()
 
void slotUpdateRegionOfInterest ()
 
void startUpdateCanvasProjection (const QRect &rc)
 
void updateCanvasProjection ()
 

Private Member Functions

void connectCurrentCanvas ()
 
void createCanvas (bool useOpenGL)
 
void createOpenGLCanvas ()
 
void createQPainterCanvas ()
 
void initializeFpsDecoration ()
 
void notifyLevelOfDetailChange ()
 
void requestCanvasUpdateMaybeCompressed ()
 
void resetCanvas (bool useOpenGL)
 
void setCanvasWidget (KisAbstractCanvasWidget *widget)
 
void setup ()
 
void slotSurfaceFormatChanged (const KisDisplayConfig &config)
 
void updateCanvasWidgetImpl (const QRect &rc=QRect())
 

Private Attributes

KisCanvas2Private *const m_d
 

Friends

class KisView
 

Detailed Description

KisCanvas2 is not an actual widget class, but rather an adapter for the widget it contains, which may be either a QPainter based canvas, or an OpenGL based canvas: that are the real widgets.

Definition at line 144 of file kis_canvas2.cpp.

Constructor & Destructor Documentation

◆ ~KisCanvas2Private()

KisCanvas2::~KisCanvas2Private ( )
inline

Definition at line 204 of file kis_canvas2.cpp.

205 {
206 inputActionGroupsMaskInterface->m_canvasPrivateRef = nullptr;
207
208 // We need to make sure that the QScopedPointer gets freed within the scope
209 // of KisCanvas2Private's lifespan. For some reason, this isn't guaranteed
210 // and was causing a crash when closing a file when playback is happening
211 // and there are multiple images. See Bug: 499658
212 animationPlayer.reset();
213 }
QScopedPointer< KisCanvasAnimationState > animationPlayer
QSharedPointer< CanvasInputActionGroupsMaskInterface > inputActionGroupsMaskInterface

◆ KisCanvas2()

KisCanvas2::KisCanvas2 ( KisCoordinatesConverter * coordConverter,
KoCanvasResourceProvider * resourceManager,
KisMainWindow * mainWindow,
KisView * view,
KoShapeControllerBase * sc )

Create a new canvas. The canvas manages a widget that will do the actual painting: the canvas itself is not a widget.

Parameters
viewConverterthe viewconverter for converting between window and document coordinates.

While loading LoD should be blocked. Only when GUI has finished loading and zoom level settled down, LoD is given a green light.

Definition at line 327 of file kis_canvas2.cpp.

329 , m_d(new KisCanvas2Private(this, coordConverter, view, resourceManager))
330{
336 m_d->bootstrapLodBlocked = true;
337 connect(mainWindow, SIGNAL(guiLoadingFinished()), SLOT(bootstrapFinished()));
338
339 KisImageConfig config(false);
340
341#if !KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
342 m_d->canvasUpdateCompressor.setDelay(1000 / config.fpsLimit());
343 m_d->canvasUpdateCompressor.setMode(KisSignalCompressor::FIRST_ACTIVE);
344#endif
345
346 m_d->frameRenderStartCompressor.setDelay(1000 / config.fpsLimit());
347 m_d->frameRenderStartCompressor.setMode(KisSignalCompressor::FIRST_ACTIVE);
349}
KisCanvas2Private *const m_d
QPointer< KisView > view
void bootstrapFinished()
KisCanvas2Private(KisCanvas2 *parent, KisCoordinatesConverter *coordConverter, QPointer< KisView > view, KoCanvasResourceProvider *resourceManager)
KoSnapGuide * snapGuide
QPointer< KoCanvasResourceProvider > resourceManager
void overrideSnapStrategy(Strategy type, KoSnapStrategy *strategy)

References bootstrapFinished(), KisSignalCompressor::FIRST_ACTIVE, KisImageConfig::fpsLimit(), m_d, KoSnapGuide::overrideSnapStrategy(), KoSnapGuide::PixelSnapping, and KoCanvasBase::snapGuide.

◆ ~KisCanvas2()

KisCanvas2::~KisCanvas2 ( )
override

Definition at line 431 of file kis_canvas2.cpp.

432{
433 delete m_d;
434}

References m_d.

Member Function Documentation

◆ addCommand()

void KisCanvas2::addCommand ( KUndo2Command * command)
overridevirtual

Adds a command to the history. Call this for each command you create. This will also execute the command. This means, most of the application's code will look like MyCommand * cmd = new MyCommand( parameters ); canvas.addCommand( cmd );

Note that the command history takes ownership of the command, it will delete it when the undo limit is reached, or when deleting the command history itself.

Parameters
commandthe command to add

Implements KoCanvasBase.

Definition at line 574 of file kis_canvas2.cpp.

575{
576 // This method exists to support flake-related operations
577 m_d->view->image()->undoAdapter()->addCommand(command);
578}

References m_d.

◆ addDecoration()

void KisCanvas2::addDecoration ( KisCanvasDecorationSP deco)
Returns
true if the canvas image should be displayed in vertically mirrored mode

Definition at line 1549 of file kis_canvas2.cpp.

1550{
1551 m_d->canvasWidget->addDecoration(deco);
1552}

References m_d.

◆ animationState()

KisCanvasAnimationState * KisCanvas2::animationState ( ) const

Definition at line 1599 of file kis_canvas2.cpp.

1600{
1601 return m_d->animationPlayer.data();
1602}

References m_d.

◆ assignChangedMultiSurfaceState()

void KisCanvas2::assignChangedMultiSurfaceState ( const KisMultiSurfaceStateManager::State & newState)

◆ assignChangedMultiSurfaceStateSkipCanvasSurface()

void KisCanvas2::assignChangedMultiSurfaceStateSkipCanvasSurface ( const KisMultiSurfaceStateManager::State & newState)

◆ bootstrapFinished

void KisCanvas2::bootstrapFinished ( )
privateslot

Definition at line 1644 of file kis_canvas2.cpp.

1645{
1646 if (!m_d->bootstrapLodBlocked) return;
1647
1648 m_d->bootstrapLodBlocked = false;
1649 setLodPreferredInCanvas(m_d->lodPreferredInImage);
1650
1651 // Initialization of audio tracks is deferred until after canvas has been completely constructed.
1652 m_d->animationPlayer->setupAudioTracks();
1653}
void setLodPreferredInCanvas(bool value)

References m_d, and setLodPreferredInCanvas().

◆ canvasIsOpenGL()

bool KisCanvas2::canvasIsOpenGL ( ) const
overridevirtual
Returns
true if opengl can be used directly on the canvas

Reimplemented from KoCanvasBase.

Definition at line 517 of file kis_canvas2.cpp.

518{
519 return m_d->currentCanvasIsOpenGL;
520}

References m_d.

◆ canvasWidget() [1/2]

const QWidget * KisCanvas2::canvasWidget ( ) const
overridevirtual

Return the widget that will be added to the scrollArea.

Implements KoCanvasBase.

◆ canvasWidget() [2/2]

QWidget * KisCanvas2::canvasWidget ( )
overridevirtual

Return the widget that will be added to the scrollArea.

Implements KoCanvasBase.

◆ channelSelectionChanged

void KisCanvas2::channelSelectionChanged ( )
slot

Definition at line 561 of file kis_canvas2.cpp.

562{
563 KisImageSP image = this->image();
564 m_d->channelFlags = image->rootLayer()->channelFlags();
565
566 m_d->view->viewManager()->blockUntilOperationsFinishedForced(image);
567
569 m_d->canvasWidget->channelSelectionChanged(m_d->channelFlags);
571 image->unlock();
572}
void startUpdateInPatches(const QRect &imageRect)
KisImageWSP image() const
KisGroupLayerSP rootLayer() const
void unlock()
Definition kis_image.cc:805
void barrierLock(bool readOnly=false)
Wait until all the queued background jobs are completed and lock the image.
Definition kis_image.cc:756
QRect bounds() const override
QBitArray channelFlags
Definition kis_layer.cc:167

References KisImage::barrierLock(), KisImage::bounds(), KisLayer::channelFlags, image(), m_d, KisImage::rootLayer(), startUpdateInPatches(), and KisImage::unlock().

◆ colorManagementReport()

QString KisCanvas2::colorManagementReport ( ) const

Return user-facing information about color management status of the main window surface. The information is intentionally left untranslated, since it is supposed to be used for bugreports.

Definition at line 1692 of file kis_canvas2.cpp.

1693{
1694#if KRITA_USE_SURFACE_COLOR_MANAGEMENT_API
1695 QString report;
1696 QDebug str(&report);
1697
1698 if (m_d->canvasWidget) {
1699 str << "(canvas bit depth report)" << Qt::endl;
1700 str << Qt::endl;
1701 str.noquote().nospace() << m_d->canvasWidget->currentBitDepthUserReport();
1702 }
1703
1704 str << Qt::endl;
1705
1706 if (m_d->surfaceColorManager) {
1707 str.noquote().nospace() << QString("(canvas surface color manager)\n");
1708 str.noquote().nospace() << QString("\n");
1709 str.noquote().nospace() << m_d->surfaceColorManager->colorManagementReport();
1710 } else {
1711 str.noquote().nospace() << QString("Surface color management is not supported on this platform\n");
1712 }
1713
1714 return report;
1715#else
1716 return "Surface color management is disabled\n";
1717#endif
1718}

References m_d.

◆ connectCurrentCanvas()

void KisCanvas2::connectCurrentCanvas ( )
private

Definition at line 842 of file kis_canvas2.cpp.

843{
844 KisImageWSP image = m_d->view->image();
845
846 if (!m_d->currentCanvasIsOpenGL) {
847 Q_ASSERT(m_d->prescaledProjection);
848 m_d->prescaledProjection->setImage(image);
849 }
850
852 setLodPreferredInCanvas(m_d->lodPreferredInImage);
853
854 Q_EMIT sigCanvasEngineChanged();
855}
void startResizingImage()
void sigCanvasEngineChanged()

References image(), m_d, setLodPreferredInCanvas(), sigCanvasEngineChanged(), and startResizingImage().

◆ coordinatesConverter()

const KisCoordinatesConverter * KisCanvas2::coordinatesConverter ( ) const

◆ createCanvas()

void KisCanvas2::createCanvas ( bool useOpenGL)
private

Definition at line 769 of file kis_canvas2.cpp.

770{
771 // deinitialize previous canvas structures
772 m_d->prescaledProjection = 0;
773 m_d->frameCache = 0;
774
775 KisConfig cfg(true);
776
777 if (useOpenGL && !KisOpenGL::hasOpenGL()) {
778 warnKrita << "Tried to create OpenGL widget when system doesn't have OpenGL\n";
779 useOpenGL = false;
780 }
781
782 if (useOpenGL) {
784 if (cfg.canvasState() == "OPENGL_FAILED") {
785 // Creating the opengl canvas failed, fall back
786 warnKrita << "OpenGL Canvas initialization returned OPENGL_FAILED. Falling back to QPainter.";
788 }
789 } else {
791 }
792
793 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->multiSurfaceState);
794 m_d->displayColorConverter.setMultiSurfaceDisplayConfig(m_d->multiSurfaceState->multiConfig);
795
796 if (m_d->popupPalette) {
797 m_d->popupPalette->setParent(m_d->canvasWidget->widget());
798 }
799
800}
void createQPainterCanvas()
void createOpenGLCanvas()
static bool hasOpenGL()
Check for OpenGL.
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
#define warnKrita
Definition kis_debug.h:87

References KisConfig::canvasState(), createOpenGLCanvas(), createQPainterCanvas(), KisOpenGL::hasOpenGL(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, and warnKrita.

◆ createOpenGLCanvas()

void KisCanvas2::createOpenGLCanvas ( )
private

Definition at line 742 of file kis_canvas2.cpp.

743{
744 KisConfig cfg(true);
745 m_d->openGLFilterMode = cfg.openGLFilteringMode();
746 m_d->currentCanvasIsOpenGL = true;
747
748 m_d->multiSurfaceState =
749 m_d->multiSurfaceSetupManager.createInitializingConfig(true, m_d->currentScreenId(), m_d->proofingConfig);
750
751 auto bitDepthMode =
752 cfg.effectiveCanvasSurfaceBitDepthMode(QSurfaceFormat::defaultFormat())
756
758 m_d->coordinatesConverter,
759 0,
760 m_d->view->image(),
761 m_d->multiSurfaceState->multiConfig.canvasDisplayConfig(),
762 m_d->displayColorConverter.displayFilter(),
763 bitDepthMode);
764 m_d->frameCache = KisAnimationFrameCache::getFrameCache(canvasWidget->openGLImageTextures());
765
767}
static KisAnimationFrameCacheSP getFrameCache(KisOpenGLImageTexturesSP textures)
KisAbstractCanvasWidget * canvasWidget
void setCanvasWidget(KisAbstractCanvasWidget *widget)

References canvasWidget, KisAbstractCanvasWidget::Depth10Bit, KisConfig::Depth10Bit, KisAbstractCanvasWidget::Depth8Bit, KisConfig::effectiveCanvasSurfaceBitDepthMode(), KisAnimationFrameCache::getFrameCache(), m_d, KisConfig::openGLFilteringMode(), and setCanvasWidget().

◆ createQPainterCanvas()

void KisCanvas2::createQPainterCanvas ( )
private

Definition at line 726 of file kis_canvas2.cpp.

727{
728 m_d->currentCanvasIsOpenGL = false;
729
730 m_d->multiSurfaceState =
731 m_d->multiSurfaceSetupManager.createInitializingConfig(false, m_d->currentScreenId(), m_d->proofingConfig);
732
733 KisQPainterCanvas * canvasWidget = new KisQPainterCanvas(this, m_d->coordinatesConverter, m_d->view);
734 m_d->prescaledProjection = new KisPrescaledProjection();
735 m_d->prescaledProjection->setCoordinatesConverter(m_d->coordinatesConverter);
736 m_d->prescaledProjection->setDisplayConfig(m_d->multiSurfaceState->multiConfig.canvasDisplayConfig());
737 m_d->prescaledProjection->setDisplayFilter(m_d->displayColorConverter.displayFilter());
738 canvasWidget->setPrescaledProjection(m_d->prescaledProjection);
740}

References canvasWidget, m_d, and setCanvasWidget().

◆ currentImage()

KisImageWSP KisCanvas2::currentImage ( ) const

Definition at line 1420 of file kis_canvas2.cpp.

1421{
1422 return m_d->view->image();
1423}

References m_d.

◆ currentScreenId()

int KisCanvas2::currentScreenId ( ) const
inline

Definition at line 286 of file kis_canvas2.cpp.

286 {
287 int canvasScreenNumber = qApp->screens().indexOf(view->currentScreen());
288
289 if (canvasScreenNumber < 0) {
290 warnKrita << "Couldn't detect screen that Krita belongs to..." << ppVar(view->currentScreen());
291 canvasScreenNumber = 0;
292 }
293 return canvasScreenNumber;
294 }
#define ppVar(var)
Definition kis_debug.h:155

References ppVar, and warnKrita.

◆ currentShapeManagerOwnerShape()

KoShape * KisCanvas2::currentShapeManagerOwnerShape ( ) const
overridevirtual

the shape that owns the currently active shape manager

When the editor enters some kind of "group editing mode", the user see only shapes belonging to this particular group. In other words, the shapeManager() of this canvas will contain only shapes of this "entered" group.

currentShapeManagerOwnerShape() returns the shape that represents this currently entered group, so that the tools could detect it better

If no group is currently entered, then the function returns nullptr.

NOTE: the functionality is currently implemented for text shapes only, not for actual groups :)

Reimplemented from KoCanvasBase.

Definition at line 610 of file kis_canvas2.cpp.

611{
612 return m_d->groupModeShapeWrapper ? m_d->groupModeShapeWrapper->shape() : nullptr;
613}

References m_d.

◆ decoration()

KisCanvasDecorationSP KisCanvas2::decoration ( const QString & id) const

Definition at line 1554 of file kis_canvas2.cpp.

1555{
1556 return m_d->canvasWidget->decoration(id);
1557}

References m_d.

◆ disconnectCanvasObserver()

void KisCanvas2::disconnectCanvasObserver ( QObject * object)
overridevirtual

disconnect the given QObject completely and utterly from any and all connections it has to any QObject owned by the canvas. Do this in the setCanvas of every KoCanvasObserver.

Reimplemented from KoCanvasBase.

Definition at line 1313 of file kis_canvas2.cpp.

1314{
1316 m_d->view->disconnect(object);
1317}
virtual void disconnectCanvasObserver(QObject *object)

References KoCanvasBase::disconnectCanvasObserver(), and m_d.

◆ disconnectImage()

void KisCanvas2::disconnectImage ( )

We explicitly don't use barrierLock() here, because we don't care about all the updates completed (we don't use image's content). We only need to guarantee that the image will not try to access us in a multithreaded way, while we are being destroyed.

Definition at line 826 of file kis_canvas2.cpp.

827{
828 KisImageSP image = m_d->view->image();
829
838 disconnect(image.data(), 0, this, 0);
839 image->unlock();
840}
void immediateLockForReadOnly()
Definition kis_image.cc:793

References KisWeakSharedPtr< T >::data(), image(), KisImage::immediateLockForReadOnly(), m_d, and KisImage::unlock().

◆ displayColorConverter()

KisDisplayColorConverter * KisCanvas2::displayColorConverter ( ) const

◆ displayFilter()

QSharedPointer< KisDisplayFilter > KisCanvas2::displayFilter ( ) const

Definition at line 920 of file kis_canvas2.cpp.

921{
922 return m_d->displayColorConverter.displayFilter();
923}

References m_d.

◆ documentOffset()

QPoint KisCanvas2::documentOffset ( ) const

Definition at line 1571 of file kis_canvas2.cpp.

1572{
1573 return m_d->coordinatesConverter->documentOffset();
1574}

References m_d.

◆ documentOrigin()

QPoint KisCanvas2::documentOrigin ( ) const
overridevirtual

Return the position of the document origin inside the canvas widget, in pixels. By default the origin of the canvas widget and the position of the document origin are coincident, thus an empty point is returned.

In Krita we don't use document origin anymore. All the centering when needed (vastScrolling < 0.5) is done automatically by the KisCoordinatesConverter.

Reimplemented from KoCanvasBase.

Definition at line 1560 of file kis_canvas2.cpp.

1561{
1568 return QPoint();
1569}

◆ docUpdateRectToWidget()

QRect KisCanvas2::docUpdateRectToWidget ( const QRectF & docRect)

◆ effectiveLodAllowedInImage()

bool KisCanvas2::effectiveLodAllowedInImage ( ) const
inline

Definition at line 271 of file kis_canvas2.cpp.

271 {
273 }
bool bootstrapLodBlocked
bool lodPreferredInImage

◆ exposureGammaCorrectionInterface()

KisExposureGammaCorrectionInterface * KisCanvas2::exposureGammaCorrectionInterface ( ) const

Definition at line 950 of file kis_canvas2.cpp.

951{
952 QSharedPointer<KisDisplayFilter> displayFilter = m_d->displayColorConverter.displayFilter();
953
954 return displayFilter ?
955 displayFilter->correctionInterface() :
957}
QSharedPointer< KisDisplayFilter > displayFilter() const
static KisDumbExposureGammaCorrectionInterface * instance()

References displayFilter(), KisDumbExposureGammaCorrectionInterface::instance(), and m_d.

◆ fetchProofingOptions()

void KisCanvas2::fetchProofingOptions ( )

fetchProofingOptions Get the options for softproofing, and apply the view-specific state without affecting the proofing options as stored inside the image.

Definition at line 959 of file kis_canvas2.cpp.

960{
962 if (!baseConfig) {
963 baseConfig = KisImageConfig(true).defaultProofingconfiguration();
964 }
965 *m_d->proofingConfig = *baseConfig;
966
968}
void updateProofingState()
KisProofingConfigurationSP defaultProofingconfiguration(bool requestDefault=false)
KisProofingConfigurationSP proofingConfiguration() const
proofingConfiguration

References KisImageConfig::defaultProofingconfiguration(), image(), m_d, KisImage::proofingConfiguration(), and updateProofingState().

◆ finishResizingImage

void KisCanvas2::finishResizingImage ( qint32 w,
qint32 h )
slot

Definition at line 1045 of file kis_canvas2.cpp.

1046{
1047 m_d->canvasWidget->finishResizingImage(w, h);
1048}

References m_d.

◆ frameCache()

KisAnimationFrameCacheSP KisCanvas2::frameCache ( ) const

◆ globalInputManager()

KisInputManager * KisCanvas2::globalInputManager ( ) const

Filters events and sends them to canvas actions. Shared among all the views/canvases

NOTE: May be null while initialization!

Definition at line 686 of file kis_canvas2.cpp.

687{
688 return m_d->view->globalInputManager();
689}

References m_d.

◆ globalShapeManager()

KoShapeManager * KisCanvas2::globalShapeManager ( ) const

Return the shape manager associated with this canvas

Definition at line 605 of file kis_canvas2.cpp.

606{
607 return &m_d->shapeManager;
608}

References m_d.

◆ gridSize()

void KisCanvas2::gridSize ( QPointF * offset,
QSizeF * spacing ) const
overridevirtual

retrieve the grid size setting. The grid spacing will be provided in pt.

Parameters
horizontala pointer to a qreal that will be filled with the horizontal grid-spacing
verticala pointer to a qreal that will be filled with the vertical grid-spacing

Implements KoCanvasBase.

Definition at line 527 of file kis_canvas2.cpp.

528{
529 QTransform transform = coordinatesConverter()->imageToDocumentTransform();
530
531 const QPoint intSpacing = m_d->view->document()->gridConfig().spacing();
532 const QPoint intOffset = m_d->view->document()->gridConfig().offset();
533
534 QPointF size = transform.map(QPointF(intSpacing));
535 spacing->rwidth() = size.x();
536 spacing->rheight() = size.y();
537
538 *offset = transform.map(QPointF(intOffset));
539}
KisCoordinatesConverter * coordinatesConverter
int size(const Forest< T > &forest)
Definition KisForest.h:1232

References coordinatesConverter, KisCoordinatesConverter::imageToDocumentTransform(), and m_d.

◆ image()

KisImageWSP KisCanvas2::image ( ) const

Definition at line 1414 of file kis_canvas2.cpp.

1415{
1416 return m_d->view->image();
1417
1418}

References m_d.

◆ imageView()

QPointer< KisView > KisCanvas2::imageView ( ) const

Definition at line 1409 of file kis_canvas2.cpp.

1410{
1411 return m_d->view;
1412}

References m_d.

◆ initializeFpsDecoration()

void KisCanvas2::initializeFpsDecoration ( )
private

Definition at line 411 of file kis_canvas2.cpp.

412{
413 KisConfig cfg(true);
414
415 const bool shouldShowDebugOverlay =
416 (canvasIsOpenGL() && cfg.enableOpenGLFramerateLogging()) ||
417 cfg.enableBrushSpeedLogging();
418
419 if (shouldShowDebugOverlay && !decoration(KisFpsDecoration::idTag)) {
421
422 if (cfg.enableBrushSpeedLogging()) {
423 connect(KisStrokeSpeedMonitor::instance(), SIGNAL(sigStatsUpdated()), this, SLOT(updateCanvas()));
424 }
425 } else if (!shouldShowDebugOverlay && decoration(KisFpsDecoration::idTag)) {
426 m_d->canvasWidget->removeDecoration(KisFpsDecoration::idTag);
427 disconnect(KisStrokeSpeedMonitor::instance(), SIGNAL(sigStatsUpdated()), this, SLOT(updateCanvas()));
428 }
429}
void addDecoration(KisCanvasDecorationSP deco)
bool canvasIsOpenGL() const override
QPointer< KisView > imageView() const
KisCanvasDecorationSP decoration(const QString &id) const
void updateCanvas()
Update the entire canvas area.
static const QString idTag
static KisStrokeSpeedMonitor * instance()

References addDecoration(), canvasIsOpenGL(), decoration(), KisConfig::enableBrushSpeedLogging(), KisConfig::enableOpenGLFramerateLogging(), KisFpsDecoration::idTag, imageView(), KisStrokeSpeedMonitor::instance(), m_d, and updateCanvas().

◆ initializeImage()

void KisCanvas2::initializeImage ( )

Definition at line 802 of file kis_canvas2.cpp.

803{
804 KisImageSP image = m_d->view->image();
805
806 m_d->displayColorConverter.setImageColorSpace(image->colorSpace());
807 m_d->coordinatesConverter->setImage(image);
808 m_d->toolProxy.initializeImage(image);
809
810 connect(image, SIGNAL(sigImageUpdated(QRect)), SLOT(startUpdateCanvasProjection(QRect)), Qt::DirectConnection);
811 connect(image->signalRouter(), SIGNAL(sigNotifyBatchUpdateStarted()), SLOT(slotBeginUpdatesBatch()), Qt::DirectConnection);
812 connect(image->signalRouter(), SIGNAL(sigNotifyBatchUpdateEnded()), SLOT(slotEndUpdatesBatch()), Qt::DirectConnection);
813 connect(image->signalRouter(), SIGNAL(sigRequestLodPlanesSyncBlocked(bool)), SLOT(slotSetLodUpdatesBlocked(bool)), Qt::DirectConnection);
814
815 connect(image, SIGNAL(sigProofingConfigChanged()), SLOT(slotChangeProofingConfig()));
816 connect(image, SIGNAL(sigSizeChanged(QPointF,QPointF)), SLOT(startResizingImage()), Qt::DirectConnection);
817 connect(image->undoAdapter(), SIGNAL(selectionChanged()), SLOT(slotTrySwitchShapeManager()));
818
819 connect(image, SIGNAL(sigColorSpaceChanged(const KoColorSpace*)), SLOT(slotImageColorSpaceChanged()));
820 connect(image, SIGNAL(sigProfileChanged(const KoColorProfile*)), SLOT(slotImageColorSpaceChanged()));
821
824}
void slotBeginUpdatesBatch()
void fetchProofingOptions()
fetchProofingOptions Get the options for softproofing, and apply the view-specific state without affe...
void slotEndUpdatesBatch()
void slotSetLodUpdatesBlocked(bool value)
void startUpdateCanvasProjection(const QRect &rc)
void slotImageColorSpaceChanged()
void slotChangeProofingConfig()
void connectCurrentCanvas()
void slotTrySwitchShapeManager()
KisUndoAdapter * undoAdapter() const
const KoColorSpace * colorSpace() const
KisImageSignalRouter * signalRouter()

References KisImage::colorSpace(), connectCurrentCanvas(), fetchProofingOptions(), image(), m_d, KisImage::signalRouter(), slotBeginUpdatesBatch(), slotChangeProofingConfig(), slotEndUpdatesBatch(), slotImageColorSpaceChanged(), slotSetLodUpdatesBlocked(), slotTrySwitchShapeManager(), startResizingImage(), startUpdateCanvasProjection(), and KisImage::undoAdapter().

◆ inputActionGroupsMaskInterface()

KisInputActionGroupsMaskInterface::SharedInterface KisCanvas2::inputActionGroupsMaskInterface ( )
Returns
a reference to alter this canvas' input action groups mask

◆ KisCanvas2Private()

KisCanvas2::KisCanvas2Private ( KisCanvas2 * parent,
KisCoordinatesConverter * coordConverter,
QPointer< KisView > view,
KoCanvasResourceProvider * resourceManager )
inline

Definition at line 171 of file kis_canvas2.cpp.

175 : q(parent)
176 , coordinatesConverter(coordConverter)
177 , view(view)
178 , shapeManager(parent)
180 , toolProxy(parent)
183 , inputActionGroupsMaskInterface(new CanvasInputActionGroupsMaskInterface(this))
186 {
187#if KRITA_USE_SURFACE_COLOR_MANAGEMENT_API
188 if (KisPlatformPluginInterfaceFactory::instance()->surfaceColorManagedByOS()) {
189 rootSurfaceInfoProxy = new KisRootSurfaceInfoProxy(view, q);
190 multiSurfaceSetupManager.setRootSurfaceInfoProxy(rootSurfaceInfoProxy);
191 connect(rootSurfaceInfoProxy,
193 parent,
194 [this](const KoColorProfile *profile) {
196 return;
199 });
200 }
201#endif
202 }
KisSelectedShapesProxy selectedShapesProxy
KisDisplayColorConverter displayColorConverter
std::optional< KisMultiSurfaceStateManager::State > multiSurfaceState
KisProofingConfigurationSP proofingConfig
KoShapeManager shapeManager
void assignChangedMultiSurfaceState(const KisMultiSurfaceStateManager::State &newState)
KisToolProxy toolProxy
KisSignalCompressor referencesBoundsUpdateCompressor
KisMultiSurfaceStateManager multiSurfaceSetupManager
KisSignalCompressor regionOfInterestUpdateCompressor
KisCanvas2 * q
State onGuiSurfaceFormatChanged(const State &oldState, const KoColorProfile *uiProfile) const
static KisPlatformPluginInterfaceFactory * instance()
The KisProofingConfiguration struct Little struct that stores the proofing configuration for a given ...
void sigRootSurfaceProfileChanged(const KoColorProfile *profile) const

References KisPlatformPluginInterfaceFactory::instance(), and KisRootSurfaceInfoProxy::sigRootSurfaceProfileChanged().

◆ localShapeManager()

KoShapeManager * KisCanvas2::localShapeManager ( ) const

Return shape manager associated with the currently active node. If current node has no internal shape manager, return null.

The group shape should be manually reset by the external code when the active layer is switched.

Definition at line 634 of file kis_canvas2.cpp.

635{
636 KisNodeSP node = m_d->view->currentNode();
637 KoShapeManager *localShapeManager = fetchShapeManagerFromNode(node);
638
644 !m_d->groupModeShapeWrapper ||
646 localShapeManager->shapes().contains(m_d->groupModeShapeWrapper->shape())) {
647
648 m_d->groupModeShapeWrapper = std::nullopt;
649 }
650
651 if (m_d->groupModeShapeWrapper) {
652 auto textShape = dynamic_cast<KoSvgTextShape*>(m_d->groupModeShapeWrapper->shape());
653
654 // we currently support entering text shapes only
655 KIS_SAFE_ASSERT_RECOVER(textShape) {
656 m_d->groupModeShapeWrapper = std::nullopt;
657 }
658
659 if (textShape) {
660 localShapeManager = textShape->internalShapeManager();
661 }
662 }
663
664 if (localShapeManager != m_d->currentlyActiveShapeManager) {
665 m_d->setActiveShapeManager(localShapeManager);
666 }
667
668 return localShapeManager;
669}
KoShapeManager * localShapeManager() const
QList< KoShape * > shapes
#define KIS_SAFE_ASSERT_RECOVER(cond)
Definition kis_assert.h:126

References KIS_SAFE_ASSERT_RECOVER, localShapeManager(), m_d, and KoShapeManager::shapes.

◆ lodIsSupported()

bool KisCanvas2::lodIsSupported ( ) const
inline

◆ lodPreferredInCanvas()

bool KisCanvas2::lodPreferredInCanvas ( ) const

Definition at line 1670 of file kis_canvas2.cpp.

1671{
1672 return m_d->lodPreferredInImage;
1673}

References m_d.

◆ notifyLevelOfDetailChange()

void KisCanvas2::notifyLevelOfDetailChange ( )
private

Definition at line 1380 of file kis_canvas2.cpp.

1381{
1382 KisImageSP image = this->image();
1383
1384 if (m_d->bootstrapLodBlocked || !m_d->lodIsSupported()) {
1386 } else {
1387 const qreal effectiveZoom = m_d->coordinatesConverter->effectiveZoom();
1388
1389 KisConfig cfg(true);
1390 const int maxLod = cfg.numMipmapLevels();
1391 const int lod = KisLodTransform::scaleToLod(effectiveZoom, maxLod);
1392 KisLodPreferences::PreferenceFlags flags = KisLodPreferences::LodSupported;
1393
1394 if (m_d->lodPreferredInImage) {
1396 }
1398 }
1399}
void setLodPreferences(const KisLodPreferences &value)
static int scaleToLod(qreal scale, int maxLod)

References image(), KisLodPreferences::LodPreferred, KisLodPreferences::LodSupported, m_d, KisLodPreferences::None, KisConfig::numMipmapLevels(), KisLodTransformBase::scaleToLod(), and KisImage::setLodPreferences().

◆ openGLFilterMode()

KisOpenGL::FilterMode KisCanvas2::openGLFilterMode ( ) const

◆ paintingAssistantsDecoration()

KisPaintingAssistantsDecorationSP KisCanvas2::paintingAssistantsDecoration ( ) const

Definition at line 1675 of file kis_canvas2.cpp.

1676{
1677 KisCanvasDecorationSP deco = decoration("paintingAssistantsDecoration");
1678 return qobject_cast<KisPaintingAssistantsDecoration*>(deco.data());
1679}

References KisSharedPtr< T >::data(), and decoration().

◆ popupPalette()

KisPopupPalette * KisCanvas2::popupPalette ( )

◆ proofingConfigUpdated()

bool KisCanvas2::proofingConfigUpdated ( )

proofingConfigUpdated ask the canvas whether or not it updated the proofing config.

Returns
whether or not the proofing config is updated, if so, a new proofing transform needs to be made in KisOpenGL canvas.

◆ proofingConfiguration()

KisProofingConfigurationSP KisCanvas2::proofingConfiguration ( ) const

Definition at line 1028 of file kis_canvas2.cpp.

1029{
1030 return m_d->proofingConfig;
1031}

References m_d.

◆ referenceImagesDecoration()

KisReferenceImagesDecorationSP KisCanvas2::referenceImagesDecoration ( ) const

Definition at line 1681 of file kis_canvas2.cpp.

1682{
1683 KisCanvasDecorationSP deco = decoration("referenceImagesDecoration");
1684 return qobject_cast<KisReferenceImagesDecoration*>(deco.data());
1685}

References KisSharedPtr< T >::data(), and decoration().

◆ refetchDataFromImage()

void KisCanvas2::refetchDataFromImage ( )

Definition at line 1477 of file kis_canvas2.cpp.

1478{
1479 KisImageSP image = this->image();
1480 KisImageReadOnlyBarrierLock l(image);
1482}

References KisImage::bounds(), image(), and startUpdateInPatches().

◆ regionOfInterest()

QRect KisCanvas2::regionOfInterest ( ) const
Returns
area of the image (in image coordinates) that is visible on the canvas with a small margin selected by the user

◆ renderingLimit()

QRect KisCanvas2::renderingLimit ( ) const
Returns
artificial limit outside which the image will not be rendered

◆ requestCanvasUpdateMaybeCompressed()

void KisCanvas2::requestCanvasUpdateMaybeCompressed ( )
private

If Qt has our custom patch for global updates compression, then we shouldn't do our own compression here in the canvas. Everything will be done in Qt.

Definition at line 1159 of file kis_canvas2.cpp.

1160{
1165#if !KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
1166 m_d->canvasUpdateCompressor.start();
1167#else
1169#endif
1170}
void slotDoCanvasUpdate()

References m_d, and slotDoCanvasUpdate().

◆ resetCanvas()

void KisCanvas2::resetCanvas ( bool useOpenGL)
private

Definition at line 857 of file kis_canvas2.cpp.

858{
859 // we cannot reset the canvas before it's created, but this method might be called,
860 // for instance when setting the monitor profile.
861 if (!m_d->canvasWidget) {
862 return;
863 }
864
865 KisConfig cfg(true);
866
867 const bool canvasHasNativeSurface = bool(m_d->canvasWidget->widget()->windowHandle());
868 const bool canvasNeedsNativeSurface =
869 cfg.enableCanvasSurfaceColorSpaceManagement() &&
871
872 bool needReset = (m_d->currentCanvasIsOpenGL != useOpenGL) ||
873 (m_d->currentCanvasIsOpenGL &&
874 m_d->openGLFilterMode != cfg.openGLFilteringMode()) ||
875 canvasHasNativeSurface != canvasNeedsNativeSurface;
876
877 if (needReset) {
878 createCanvas(useOpenGL);
880 slotEffectiveZoomChanged(m_d->coordinatesConverter->effectiveZoom());
881 }
883}
void createCanvas(bool useOpenGL)
void updateCanvasWidgetImpl(const QRect &rc=QRect())
void slotEffectiveZoomChanged(qreal newZoom)

References connectCurrentCanvas(), createCanvas(), KisConfig::enableCanvasSurfaceColorSpaceManagement(), KisPlatformPluginInterfaceFactory::instance(), m_d, KisConfig::openGLFilteringMode(), slotEffectiveZoomChanged(), KisPlatformPluginInterfaceFactory::surfaceColorManagedByOS(), and updateCanvasWidgetImpl().

◆ rotationAngle

qreal KisCanvas2::rotationAngle ( ) const
slot

canvas rotation in degrees

Definition at line 546 of file kis_canvas2.cpp.

547{
548 return m_d->coordinatesConverter->rotationAngle();
549}

References m_d.

◆ selectedShapesProxy()

KoSelectedShapesProxy * KisCanvas2::selectedShapesProxy ( ) const
overridevirtual

Since shapeManager() may change, we need a persistent object where we can connect to and thack the selection. See more comments in KoCanvasBase.

Implements KoCanvasBase.

◆ setActiveShapeManager()

void KisCanvas2::setActiveShapeManager ( KoShapeManager * shapeManager)

◆ setCanvasWidget()

void KisCanvas2::setCanvasWidget ( KisAbstractCanvasWidget * widget)
private

We are switching the canvas type. We should reinitialize our connections to decorations and input manager

Definition at line 436 of file kis_canvas2.cpp.

437{
438 if (m_d->popupPalette) {
439 m_d->popupPalette->setParent(widget->widget());
440 }
441
442 if (m_d->canvasWidget) {
448 widget->setDecorations(m_d->canvasWidget->decorations());
449
450 if(viewManager()) {
452 m_d->canvasWidget = widget;
454 } else {
455 m_d->canvasWidget = widget;
456 }
457 } else {
458 m_d->canvasWidget = widget;
459 }
460
461 if (!m_d->canvasWidget->decoration(INFINITY_DECORATION_ID)) {
462 KisInfinityManager *manager = new KisInfinityManager(m_d->view, this);
463 manager->setVisible(true);
464 m_d->canvasWidget->addDecoration(manager);
465 }
466
467 widget->widget()->setAutoFillBackground(false);
468 widget->widget()->setAttribute(Qt::WA_OpaquePaintEvent);
469 widget->widget()->setMouseTracking(true);
470 widget->widget()->setAcceptDrops(true);
471
473 if (controller && controller->canvas() == this) {
474 controller->changeCanvasWidget(widget->widget());
475 }
476
477
478#if KRITA_USE_SURFACE_COLOR_MANAGEMENT_API
484 m_d->surfaceColorManager.reset();
485
486 QWindow *mainWindowNativeWindow = m_d->view->mainWindow()->windowHandle();
487 QWindow *nativeWindow = widget->widget()->windowHandle();
488
489 if (nativeWindow && nativeWindow != mainWindowNativeWindow) {
490 std::unique_ptr<KisSurfaceColorManagerInterface> iface(
491 KisPlatformPluginInterfaceFactory::instance()->createSurfaceColorManager(nativeWindow));
492
493 // if surfaceColorManagedByOS() is true, then interface is guaranteed to
494 // be present
496
497 if (iface) {
498 m_d->surfaceColorManager.reset(
499 new KisCanvasSurfaceColorSpaceManager(iface.release(),
500 m_d->multiSurfaceState->surfaceMode,
501 m_d->multiSurfaceState->multiConfig.options(),
502 this));
503
504 connect(m_d->surfaceColorManager.data(),
506 this,
508 }
509 } else {
510 qWarning() << "WARNING: created non-native Krita canvas on managed platform,"
511 << "its color space will be limited to sRGB";
512 }
513 }
514#endif
515}
virtual void setDecorations(const QList< KisCanvasDecorationSP > &)=0
virtual QWidget * widget()=0
KisViewManager * viewManager() const
void slotSurfaceFormatChanged(const KisDisplayConfig &config)
virtual void setVisible(bool v)
void removeTrackedCanvas(KisCanvas2 *canvas)
void addTrackedCanvas(KisCanvas2 *canvas)
KisInputManager * inputManager() const
Filters events and sends them to canvas actions.
KoCanvasController * controller
KoCanvasController * canvasController() const
virtual KoCanvasBase * canvas() const
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130
static const QString INFINITY_DECORATION_ID
void sigDisplayConfigChanged(const KisDisplayConfig &config)

References KisInputManager::addTrackedCanvas(), KoCanvasController::canvas(), KoCanvasBase::canvasController(), KoCanvasBase::controller, INFINITY_DECORATION_ID, KisViewManager::inputManager(), KisPlatformPluginInterfaceFactory::instance(), KIS_SAFE_ASSERT_RECOVER_NOOP, m_d, KisInputManager::removeTrackedCanvas(), KisAbstractCanvasWidget::setDecorations(), KisCanvasDecoration::setVisible(), KisCanvasSurfaceColorSpaceManager::sigDisplayConfigChanged(), slotSurfaceFormatChanged(), KisPlatformPluginInterfaceFactory::surfaceColorManagedByOS(), viewManager(), and KisAbstractCanvasWidget::widget().

◆ setCurrentShapeManagerOwnerShape()

void KisCanvas2::setCurrentShapeManagerOwnerShape ( KoShape * source)
overridevirtual

sets the group shape that is supposed to be "entered"

The tool can instruct the canvas to enter the group represented by shape shape. The implementation of the canvas is supposed to switch its shapeManager() to the one owned by shape.

NOTE: we currently have no common interface for fetching the shape manager from a particular shape. The canvas is supposed to know how to dynamic_cast the shape itself.

recalculate the local shape manager and make sure that selected shapes proxy emits all the necessary signals

Reimplemented from KoCanvasBase.

Definition at line 615 of file kis_canvas2.cpp.

616{
617 if (currentShapeManagerOwnerShape() == source) return;
618
619 m_d->groupModeShapeWrapper = std::nullopt;
620
621 // we currently support entering text shapes only
622 if (source && dynamic_cast<KoSvgTextShape*>(source)) {
623 m_d->groupModeShapeWrapper.emplace(source, [this] () {
625 });
626 }
627
632}
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
void setCurrentShapeManagerOwnerShape(KoShape *source) override
sets the group shape that is supposed to be "entered"
KoShape * currentShapeManagerOwnerShape() const override
the shape that owns the currently active shape manager
typedef void(QOPENGLF_APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer)

References currentShapeManagerOwnerShape(), localShapeManager(), m_d, setCurrentShapeManagerOwnerShape(), source(), and void().

◆ setCursor()

void KisCanvas2::setCursor ( const QCursor & cursor)
overridevirtual

set the specified cursor on this canvas

Parameters
cursorthe new cursor
Returns
the old cursor

Implements KoCanvasBase.

Definition at line 1589 of file kis_canvas2.cpp.

1590{
1591 canvasWidget()->setCursor(cursor);
1592}

References canvasWidget.

◆ setDisplayFilter()

void KisCanvas2::setDisplayFilter ( QSharedPointer< KisDisplayFilter > displayFilter)

Definition at line 908 of file kis_canvas2.cpp.

909{
910 m_d->displayColorConverter.setDisplayFilter(displayFilter);
911 KisImageSP image = this->image();
912
913 m_d->view->viewManager()->blockUntilOperationsFinishedForced(image);
914
916 m_d->canvasWidget->setDisplayFilter(displayFilter);
917 image->unlock();
918}

References KisImage::barrierLock(), displayFilter(), image(), m_d, and KisImage::unlock().

◆ setFavoriteResourceManager()

void KisCanvas2::setFavoriteResourceManager ( KisFavoriteResourceManager * favoriteResourceManager)

Definition at line 1576 of file kis_canvas2.cpp.

1577{
1578 m_d->popupPalette = new KisPopupPalette(viewManager(), m_d->coordinatesConverter, favoriteResourceManager, displayColorConverter()->displayRendererInterface(),
1579 m_d->canvasWidget->widget());
1580 connect(m_d->popupPalette, SIGNAL(zoomLevelChanged(int)), this, SLOT(slotPopupPaletteRequestedZoomChange(int)));
1581 connect(m_d->popupPalette, SIGNAL(sigUpdateCanvas()), this, SLOT(updateCanvas()));
1582 connect(m_d->view->mainWindow(), SIGNAL(themeChanged()), m_d->popupPalette, SLOT(slotUpdateIcons()));
1583}
void slotPopupPaletteRequestedZoomChange(int zoom)

References displayColorConverter, m_d, slotPopupPaletteRequestedZoomChange(), updateCanvas(), and viewManager().

◆ setLodPreferredInCanvas()

void KisCanvas2::setLodPreferredInCanvas ( bool value)

Definition at line 1655 of file kis_canvas2.cpp.

1656{
1657 if (!KisOpenGL::supportsLoD()) {
1658 qWarning() << "WARNING: Level of Detail functionality is available only with openGL + GLSL 1.3 support";
1659 }
1660
1661 m_d->lodPreferredInImage =
1662 value && m_d->lodIsSupported();
1663
1665
1666 KisConfig cfg(false);
1667 cfg.setLevelOfDetailEnabled(m_d->lodPreferredInImage);
1668}
float value(const T *src, size_t ch)
void notifyLevelOfDetailChange()

References m_d, notifyLevelOfDetailChange(), KisConfig::setLevelOfDetailEnabled(), KisOpenGL::supportsLoD(), and value().

◆ setProofingConfigUpdated()

void KisCanvas2::setProofingConfigUpdated ( bool updated)

setProofingConfigUpdated This function is to set whether the proofing config is updated, this is needed for determining whether or not to generate a new proofing transform.

Parameters
updatedwhether it's updated. Just set it to false in normal usage.

Definition at line 1018 of file kis_canvas2.cpp.

1019{
1020 m_d->proofingConfigUpdated = updated;
1021}

References m_d.

◆ setRenderingLimit()

void KisCanvas2::setRenderingLimit ( const QRect & rc)

Set artificial limit outside which the image will not be rendered rc is measured in image pixels

Definition at line 1360 of file kis_canvas2.cpp.

1361{
1362 m_d->renderingLimit = rc;
1363}

References m_d.

◆ setup()

void KisCanvas2::setup ( )
private

We switch the shape manager every time vector layer or shape selection is activated. Flake does not expect this and connects all the signals of the global shape manager to the clients in the constructor. To workaround this we forward the signals of local shape managers stored in the vector layers to the signals of global shape manager. So the sequence of signal deliveries is the following:

shapeLayer.m_d.canvas.m_shapeManager.selection() -> shapeLayer -> shapeController -> globalShapeManager.selection()

Definition at line 351 of file kis_canvas2.cpp.

352{
353 // a bit of duplication from slotConfigChanged()
354 KisConfig cfg(true);
355 m_d->lodPreferredInImage = cfg.levelOfDetailEnabled();
356 m_d->regionOfInterestMargin = KisImageConfig(true).animationCacheRegionOfInterestMargin();
357
358 createCanvas(cfg.useOpenGL());
359
360 setLodPreferredInCanvas(m_d->lodPreferredInImage);
361
362 connect(m_d->view->canvasController()->proxyObject, SIGNAL(effectiveZoomChanged(qreal)), SLOT(slotEffectiveZoomChanged(qreal)));
363 connect(m_d->view->canvasController()->proxyObject, &KoCanvasControllerProxyObject::canvasStateChanged, this, &KisCanvas2::slotCanvasStateChanged);
364
365 connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged()));
368
384 KisShapeController *kritaShapeController = static_cast<KisShapeController*>(shapeController()->documentBase());
385 connect(kritaShapeController, SIGNAL(selectionChanged()),
386 this, SLOT(slotSelectionChanged()));
387 connect(kritaShapeController, SIGNAL(selectionContentChanged()),
388 selectedShapesProxy(), SIGNAL(selectionContentChanged()));
389 connect(kritaShapeController, SIGNAL(currentLayerChanged(const KoShapeLayer*)),
390 selectedShapesProxy(), SIGNAL(currentLayerChanged(const KoShapeLayer*)));
391
392#if !KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
393 connect(&m_d->canvasUpdateCompressor, SIGNAL(timeout()), SLOT(slotDoCanvasUpdate()));
394#endif
395
396 connect(this, SIGNAL(sigCanvasCacheUpdated()), &m_d->frameRenderStartCompressor, SLOT(start()));
397 connect(&m_d->frameRenderStartCompressor, SIGNAL(timeout()), SLOT(updateCanvasProjection()));
398
399 connect(this, SIGNAL(sigContinueResizeImage(qint32,qint32)), SLOT(finishResizingImage(qint32,qint32)));
400
401 connect(&m_d->regionOfInterestUpdateCompressor, SIGNAL(timeout()), SLOT(slotUpdateRegionOfInterest()));
402 connect(&m_d->referencesBoundsUpdateCompressor, SIGNAL(timeout()), SLOT(slotUpdateReferencesBounds()));
403
404 connect(m_d->view->document(), SIGNAL(sigReferenceImagesChanged()), &m_d->referencesBoundsUpdateCompressor, SLOT(start()));
405
407
408 m_d->animationPlayer.reset(new KisCanvasAnimationState(this));
409}
void initializeFpsDecoration()
void slotCanvasStateChanged()
void sigContinueResizeImage(qint32 w, qint32 h)
void slotUpdateReferencesBounds()
void slotSelectionChanged()
void slotConfigChanged()
void updateCanvasProjection()
void slotChangeGlobalProofingConfig()
void finishResizingImage(qint32 w, qint32 h)
void slotUpdateRegionOfInterest()
void sigCanvasCacheUpdated()
The KisCanvasAnimationState class stores all of the canvas-specific animation state.
static KisConfigNotifier * instance()
static KisImageConfigNotifier * instance()
void globalProofingConfigChanged()
qreal animationCacheRegionOfInterestMargin(bool defaultValue=false) const
QPointer< KoShapeController > shapeController

References KisImageConfig::animationCacheRegionOfInterestMargin(), KoCanvasControllerProxyObject::canvasStateChanged(), createCanvas(), finishResizingImage(), KisImageConfigNotifier::globalProofingConfigChanged(), initializeFpsDecoration(), KisConfigNotifier::instance(), KisImageConfigNotifier::instance(), KisConfig::levelOfDetailEnabled(), m_d, selectedShapesProxy, setLodPreferredInCanvas(), KoCanvasBase::shapeController, sigCanvasCacheUpdated(), sigContinueResizeImage(), slotCanvasStateChanged(), slotChangeGlobalProofingConfig(), slotConfigChanged(), slotDoCanvasUpdate(), slotEffectiveZoomChanged(), slotSelectionChanged(), slotUpdateReferencesBounds(), slotUpdateRegionOfInterest(), updateCanvasProjection(), and KisConfig::useOpenGL().

◆ setWrapAroundViewingMode()

void KisCanvas2::setWrapAroundViewingMode ( bool value)

Definition at line 1616 of file kis_canvas2.cpp.

1617{
1618 KisCanvasDecorationSP infinityDecoration =
1619 m_d->canvasWidget->decoration(INFINITY_DECORATION_ID);
1620
1621 if (infinityDecoration) {
1622 infinityDecoration->setVisible(!value);
1623 }
1624
1625 m_d->canvasWidget->setWrapAroundViewingMode(value);
1626}

References INFINITY_DECORATION_ID, m_d, and value().

◆ setWrapAroundViewingModeAxis()

void KisCanvas2::setWrapAroundViewingModeAxis ( WrapAroundAxis value)

Definition at line 1633 of file kis_canvas2.cpp.

1634{
1635 m_d->canvasWidget->setWrapAroundViewingModeAxis(value);
1636 updateCanvas();
1637}

References m_d, updateCanvas(), and value().

◆ shapeManager()

KoShapeManager * KisCanvas2::shapeManager ( ) const
overridevirtual

Return the right shape manager for the current layer. That is to say, if the current layer is a vector layer, return the shape layer's canvas' shapemanager, else the shapemanager associated with the global krita canvas.

Implements KoCanvasBase.

◆ sigCanvasCacheUpdated

void KisCanvas2::sigCanvasCacheUpdated ( )
signal

◆ sigCanvasEngineChanged

void KisCanvas2::sigCanvasEngineChanged ( )
signal

◆ sigCanvasStateChanged

void KisCanvas2::sigCanvasStateChanged ( )
signal

◆ sigContinueResizeImage

void KisCanvas2::sigContinueResizeImage ( qint32 w,
qint32 h )
signal

◆ sigRegionOfInterestChanged

void KisCanvas2::sigRegionOfInterestChanged ( const QRect & roi)
signal

◆ slotBeginUpdatesBatch

void KisCanvas2::slotBeginUpdatesBatch ( )
privateslot

Definition at line 1130 of file kis_canvas2.cpp.

1131{
1132 KisUpdateInfoSP info =
1134 m_d->coordinatesConverter->imageRectInImagePixels());
1135 m_d->projectionUpdatesCompressor.putUpdateInfo(info);
1136 Q_EMIT sigCanvasCacheUpdated();
1137}

References m_d, sigCanvasCacheUpdated(), and KisMarkerUpdateInfo::StartBatch.

◆ slotCanvasStateChanged

void KisCanvas2::slotCanvasStateChanged ( )
privateslot

Definition at line 1425 of file kis_canvas2.cpp.

1426{
1427 if (!m_d->currentCanvasIsOpenGL) {
1428 Q_ASSERT(m_d->prescaledProjection);
1429 auto state = KisCanvasState::fromConverter(*m_d->coordinatesConverter);
1430 m_d->prescaledProjection->notifyCanvasStateChanged(state);
1431 }
1432
1433 updateCanvas();
1434 m_d->regionOfInterestUpdateCompressor.start();
1435
1436 Q_EMIT sigCanvasStateChanged();
1437}
void sigCanvasStateChanged()
static KisCanvasState fromConverter(const KisCoordinatesConverter &converter)

References KisCanvasState::fromConverter(), m_d, sigCanvasStateChanged(), and updateCanvas().

◆ slotChangeGlobalProofingConfig

void KisCanvas2::slotChangeGlobalProofingConfig ( )
slot

Definition at line 1001 of file kis_canvas2.cpp.

1002{
1003 if (image() && !image()->proofingConfiguration()) {
1004 // global config should be updated only when
1005 // the image doesn't have its own config
1007 }
1008}
KisProofingConfigurationSP proofingConfiguration() const

References image(), proofingConfiguration(), and slotChangeProofingConfig().

◆ slotChangeProofingConfig

void KisCanvas2::slotChangeProofingConfig ( )
slot

Definition at line 1010 of file kis_canvas2.cpp.

1011{
1013 if (imageView()->softProofing()) {
1015 }
1016}
void refetchDataFromImage()

References fetchProofingOptions(), imageView(), and refetchDataFromImage().

◆ slotConfigChanged

void KisCanvas2::slotConfigChanged ( )
slot

Called whenever the configuration settings change.

Definition at line 1439 of file kis_canvas2.cpp.

1440{
1441 KisConfig cfg(true);
1442 m_d->regionOfInterestMargin = KisImageConfig(true).animationCacheRegionOfInterestMargin();
1443
1444 resetCanvas(cfg.useOpenGL());
1445
1446 QWidget *mainWindow = m_d->view->mainWindow();
1448
1449 QWidget *topLevelWidget = mainWindow->topLevelWidget();
1450 KIS_SAFE_ASSERT_RECOVER_RETURN(topLevelWidget);
1451
1452 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->multiSurfaceState);
1453 auto newState = m_d->multiSurfaceSetupManager.onConfigChanged(*m_d->multiSurfaceState,
1454 m_d->currentScreenId(),
1455 cfg.canvasSurfaceColorSpaceManagementMode(),
1457 m_d->assignChangedMultiSurfaceState(newState);
1458
1460}
void resetCanvas(bool useOpenGL)
static Options optionsFromKisConfig(const KisConfig &cfg)

References KisImageConfig::animationCacheRegionOfInterestMargin(), KisConfig::canvasSurfaceColorSpaceManagementMode(), initializeFpsDecoration(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisDisplayConfig::optionsFromKisConfig(), resetCanvas(), and KisConfig::useOpenGL().

◆ slotDoCanvasUpdate

void KisCanvas2::slotDoCanvasUpdate ( )
privateslot

WARNING: in isBusy() we access openGL functions without making the painting context current. We hope that currently active context will be Qt's one, which is shared with our own.

Definition at line 1172 of file kis_canvas2.cpp.

1173{
1174
1175#if !KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
1181 if (m_d->canvasWidget->isBusy()) {
1182 // just restarting the timer
1183 m_d->canvasUpdateCompressor.start();
1184 return;
1185 }
1186#endif
1187
1188 QRect combinedUpdateRect = m_d->savedCanvasProjectionUpdateRect | m_d->savedOverlayUpdateRect;
1189 if (!combinedUpdateRect.isEmpty()) {
1190 // TODO: Remove this signal (only used by the old KisSketchView)
1191 Q_EMIT updateCanvasRequested(combinedUpdateRect);
1192
1193 if (wrapAroundViewingMode() && !m_d->savedCanvasProjectionUpdateRect.isEmpty()) {
1194 const QRect widgetRect = m_d->canvasWidget->widget()->rect();
1195 const QRect imageRect = m_d->coordinatesConverter->imageRectInImagePixels();
1196
1197 const QRect widgetRectInImagePixels =
1198 m_d->coordinatesConverter->widgetToImage(widgetRect).toAlignedRect();
1199
1200 const QRect rc = m_d->coordinatesConverter->widgetToImage(m_d->savedCanvasProjectionUpdateRect).toAlignedRect();
1201
1202 const QVector<QRect> updateRects =
1203 KisWrappedRect::multiplyWrappedRect(rc, imageRect, widgetRectInImagePixels, wrapAroundViewingModeAxis());
1204
1205 Q_FOREACH(const QRect &rc, updateRects) {
1206 const QRect widgetUpdateRect =
1207 m_d->coordinatesConverter->imageToWidget(rc).toAlignedRect() & widgetRect;
1208 m_d->canvasWidget->updateCanvasImage(widgetUpdateRect);
1209 }
1210 m_d->canvasWidget->updateCanvasDecorations(m_d->savedOverlayUpdateRect);
1211 } else {
1212 m_d->canvasWidget->updateCanvasImage(m_d->savedCanvasProjectionUpdateRect);
1213 m_d->canvasWidget->updateCanvasDecorations(m_d->savedOverlayUpdateRect);
1214 }
1215 } else if (m_d->updateSceneRequested) {
1216 m_d->canvasWidget->widget()->update();
1217 }
1218
1219 m_d->savedCanvasProjectionUpdateRect = QRect();
1220 m_d->savedOverlayUpdateRect = QRect();
1221 m_d->updateSceneRequested = false;
1222}
bool wrapAroundViewingMode() const
WrapAroundAxis wrapAroundViewingModeAxis() const
void updateCanvasRequested(const QRect &rc)
static QVector< QRect > multiplyWrappedRect(const QRect &rc, const QRect &wrapRect, const QRect &limitRect, WrapAroundAxis wrapAxis)

References m_d, KisWrappedRect::multiplyWrappedRect(), updateCanvasRequested(), wrapAroundViewingMode(), and wrapAroundViewingModeAxis().

◆ slotEffectiveZoomChanged

void KisCanvas2::slotEffectiveZoomChanged ( qreal newZoom)
privateslot

Definition at line 1319 of file kis_canvas2.cpp.

1320{
1321 Q_UNUSED(newZoom)
1322
1323
1324
1326}

References notifyLevelOfDetailChange().

◆ slotEndUpdatesBatch

void KisCanvas2::slotEndUpdatesBatch ( )
privateslot

Definition at line 1139 of file kis_canvas2.cpp.

1140{
1141 KisUpdateInfoSP info =
1143 m_d->coordinatesConverter->imageRectInImagePixels());
1144 m_d->projectionUpdatesCompressor.putUpdateInfo(info);
1145 Q_EMIT sigCanvasCacheUpdated();
1146}

References KisMarkerUpdateInfo::EndBatch, m_d, and sigCanvasCacheUpdated().

◆ slotGamutCheck

void KisCanvas2::slotGamutCheck ( )
slot

Definition at line 993 of file kis_canvas2.cpp.

994{
996 if (imageView()->softProofing()) {
998 }
999}

References imageView(), refetchDataFromImage(), and updateProofingState().

◆ slotImageColorSpaceChanged

void KisCanvas2::slotImageColorSpaceChanged ( )
privateslot

Definition at line 925 of file kis_canvas2.cpp.

926{
927 KisImageSP image = this->image();
928
929 m_d->view->viewManager()->blockUntilOperationsFinishedForced(image);
930
931 m_d->displayColorConverter.setImageColorSpace(image->colorSpace());
932 m_d->channelFlags = image->rootLayer()->channelFlags();
933 m_d->canvasWidget->channelSelectionChanged(m_d->channelFlags);
934
935 // Not all color spaces are supported by soft-proofing, so update state
936 if (imageView()->softProofing()) {
938 }
939
941 m_d->canvasWidget->notifyImageColorSpaceChanged(image->colorSpace());
942 image->unlock();
943}

References KisImage::barrierLock(), KisLayer::channelFlags, KisImage::colorSpace(), image(), imageView(), m_d, KisImage::rootLayer(), KisImage::unlock(), and updateProofingState().

◆ slotPopupPaletteRequestedZoomChange

void KisCanvas2::slotPopupPaletteRequestedZoomChange ( int zoom)
slot

Definition at line 1585 of file kis_canvas2.cpp.

1585 {
1586 m_d->view->canvasController()->setZoom(KoZoomMode::ZOOM_CONSTANT, (qreal)(zoom/100.0)); // 1.0 is 100% zoom
1587}
@ ZOOM_CONSTANT
zoom x %
Definition KoZoomMode.h:24

References m_d, and KoZoomMode::ZOOM_CONSTANT.

◆ slotScreenChanged

void KisCanvas2::slotScreenChanged ( QScreen * screen)
slot

Definition at line 1462 of file kis_canvas2.cpp.

1463{
1464 const int screenId = qApp->screens().indexOf(screen);
1465
1466 if (screenId < 0) {
1467 warnUI << "Failed to get screenNumber for updating display profile.";
1468 return;
1469 }
1470
1471 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->multiSurfaceState);
1472 auto newState = m_d->multiSurfaceSetupManager.onScreenChanged(*m_d->multiSurfaceState,
1473 screenId);
1474 m_d->assignChangedMultiSurfaceState(newState);
1475}
#define warnUI
Definition kis_debug.h:94

References KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, and warnUI.

◆ slotSelectionChanged

void KisCanvas2::slotSelectionChanged ( )
privateslot

Definition at line 1604 of file kis_canvas2.cpp.

1605{
1606 KisShapeLayer* shapeLayer = dynamic_cast<KisShapeLayer*>(viewManager()->activeLayer().data());
1607 if (!shapeLayer) {
1608 return;
1609 }
1610 m_d->shapeManager.selection()->deselectAll();
1611 Q_FOREACH (KoShape* shape, shapeLayer->shapeManager()->selection()->selectedShapes()) {
1612 m_d->shapeManager.selection()->select(shape);
1613 }
1614}
KoShapeManager * shapeManager() const
KisLayerSP activeLayer()
Convenience method to get at the active layer.
const QList< KoShape * > selectedShapes() const
KoSelection * selection

References KisViewManager::activeLayer(), KisSharedPtr< T >::data(), m_d, KoSelection::selectedShapes(), KoShapeManager::selection, KisShapeLayer::shapeManager(), and viewManager().

◆ slotSetLodUpdatesBlocked

void KisCanvas2::slotSetLodUpdatesBlocked ( bool value)
privateslot

Definition at line 1148 of file kis_canvas2.cpp.

1149{
1150 KisUpdateInfoSP info =
1153 KisMarkerUpdateInfo::UnblockLodUpdates,
1154 m_d->coordinatesConverter->imageRectInImagePixels());
1155 m_d->projectionUpdatesCompressor.putUpdateInfo(info);
1156 Q_EMIT sigCanvasCacheUpdated();
1157}

References KisMarkerUpdateInfo::BlockLodUpdates, m_d, sigCanvasCacheUpdated(), KisMarkerUpdateInfo::UnblockLodUpdates, and value().

◆ slotSoftProofing

void KisCanvas2::slotSoftProofing ( )
slot

Definition at line 987 of file kis_canvas2.cpp.

988{
991}

References refetchDataFromImage(), and updateProofingState().

◆ slotSurfaceFormatChanged()

void KisCanvas2::slotSurfaceFormatChanged ( const KisDisplayConfig & config)
private

Definition at line 1522 of file kis_canvas2.cpp.

1523{
1524#if KRITA_USE_SURFACE_COLOR_MANAGEMENT_API
1525
1526 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->multiSurfaceState);
1527 if (m_d->multiSurfaceState->multiConfig.canvasDisplayConfig() == config) return;
1528
1529 if (m_d->multiSurfaceState->isCanvasOpenGL) {
1530 if (config.isHDR &&
1531 m_d->canvasWidget->currentBitDepthMode() < KisOpenGLCanvas2::BitDepthMode::Depth10Bit) {
1532
1533 const QString warningMessage = i18n(
1534 "WARNING: HDR mode was activated on surface working in 8-bit mode!\n"
1535 "Please activate 10-bit mode in Krita's Preferences dialog and restart "
1536 "Krita to avoid color banding!");
1537
1538 m_d->view->showFloatingMessage(warningMessage, koIcon("warning"), 7000, KisFloatingMessage::High);
1539 warnOpenGL.noquote() << QString(warningMessage).replace('\n', ' ');
1540 warnOpenGL << ppVar(QSurfaceFormat::defaultFormat());
1541 }
1542 }
1543
1544 auto newState = m_d->multiSurfaceSetupManager.onCanvasSurfaceFormatChanged(*m_d->multiSurfaceState, config);
1545 m_d->assignChangedMultiSurfaceStateSkipCanvasSurface(newState);
1546#endif
1547}
#define warnOpenGL
Definition kis_debug.h:102
#define koIcon(name)
Use these macros for icons without any issues.
Definition kis_icon.h:25

References KisAbstractCanvasWidget::Depth10Bit, KisFloatingMessage::High, KisDisplayConfig::isHDR, KIS_SAFE_ASSERT_RECOVER_RETURN, koIcon, m_d, ppVar, and warnOpenGL.

◆ slotTrySwitchShapeManager

void KisCanvas2::slotTrySwitchShapeManager ( )
slot

Definition at line 1375 of file kis_canvas2.cpp.

1376{
1377 // noop, the shape manager is recalculated lazily on the fly
1378}

◆ slotUpdateReferencesBounds

void KisCanvas2::slotUpdateReferencesBounds ( )
privateslot

Definition at line 1349 of file kis_canvas2.cpp.

1350{
1351 QRectF referencesRect;
1352 KisReferenceImagesLayerSP layer = m_d->view->document()->referenceImagesLayer();
1353 if (layer) {
1354 referencesRect = layer->boundingImageRect();
1355 }
1356
1357 m_d->view->canvasController()->syncOnReferencesChange(referencesRect);
1358}

References KisReferenceImagesLayer::boundingImageRect(), and m_d.

◆ slotUpdateRegionOfInterest

void KisCanvas2::slotUpdateRegionOfInterest ( )
privateslot

Definition at line 1333 of file kis_canvas2.cpp.

1334{
1335 const QRect oldRegionOfInterest = m_d->regionOfInterest;
1336
1337 const qreal ratio = m_d->regionOfInterestMargin;
1338 const QRect proposedRoi = KisAlgebra2D::blowRect(m_d->coordinatesConverter->widgetRectInImagePixels(), ratio).toAlignedRect();
1339
1340 const QRect imageRect = m_d->coordinatesConverter->imageRectInImagePixels();
1341
1342 m_d->regionOfInterest = proposedRoi & imageRect;
1343
1344 if (m_d->regionOfInterest != oldRegionOfInterest) {
1345 Q_EMIT sigRegionOfInterestChanged(m_d->regionOfInterest);
1346 }
1347}
void sigRegionOfInterestChanged(const QRect &roi)
Rect blowRect(const Rect &rect, qreal coeff)

References KisAlgebra2D::blowRect(), m_d, and sigRegionOfInterestChanged().

◆ snapToGrid()

bool KisCanvas2::snapToGrid ( ) const
overridevirtual

return if snap to grid is enabled.

Returns
if snap to grid is enabled.

Implements KoCanvasBase.

Definition at line 541 of file kis_canvas2.cpp.

542{
543 return m_d->view->document()->gridConfig().snapToGrid();
544}

References m_d.

◆ startResizingImage

void KisCanvas2::startResizingImage ( )
slot

Definition at line 1033 of file kis_canvas2.cpp.

1034{
1035 KisImageWSP image = this->image();
1036 qint32 w = image->width();
1037 qint32 h = image->height();
1038
1039 Q_EMIT sigContinueResizeImage(w, h);
1040
1041 QRect imageBounds(0, 0, w, h);
1042 startUpdateInPatches(imageBounds);
1043}
qint32 width() const
qint32 height() const

References KisImage::height(), image(), sigContinueResizeImage(), startUpdateInPatches(), and KisImage::width().

◆ startUpdateCanvasProjection

void KisCanvas2::startUpdateCanvasProjection ( const QRect & rc)
privateslot

The image projection has changed, now start an update of the canvas representation.

Definition at line 1050 of file kis_canvas2.cpp.

1051{
1052 KisUpdateInfoSP info = m_d->canvasWidget->startUpdateCanvasProjection(rc);
1053 if (m_d->projectionUpdatesCompressor.putUpdateInfo(info)) {
1054 Q_EMIT sigCanvasCacheUpdated();
1055 }
1056}

References m_d, and sigCanvasCacheUpdated().

◆ startUpdateInPatches

void KisCanvas2::startUpdateInPatches ( const QRect & imageRect)
slot

We don't do patched loading for openGL canvas, because it loads the tiles, which are basically "patches". Therefore, big chunks of memory are never allocated.

Definition at line 885 of file kis_canvas2.cpp.

886{
892 if (m_d->currentCanvasIsOpenGL) {
894 } else {
895 KisImageConfig imageConfig(true);
896 int patchWidth = imageConfig.updatePatchWidth();
897 int patchHeight = imageConfig.updatePatchHeight();
898
899 for (int y = 0; y < imageRect.height(); y += patchHeight) {
900 for (int x = 0; x < imageRect.width(); x += patchWidth) {
901 QRect patchRect(x, y, patchWidth, patchHeight);
903 }
904 }
905 }
906}

References m_d, startUpdateCanvasProjection(), KisImageConfig::updatePatchHeight(), and KisImageConfig::updatePatchWidth().

◆ toolProxy()

KoToolProxy * KisCanvas2::toolProxy ( ) const
overridevirtual

Return the proxy to the active tool (determining which tool is really, really active is hard when tablets are involved, so leave that to others.

Implements KoCanvasBase.

◆ unit()

KoUnit KisCanvas2::unit ( ) const
overridevirtual

Return the unit of the current document for initialization of the widgets created by the flake framework.

See also
KoDocument::unit()

Implements KoCanvasBase.

Definition at line 702 of file kis_canvas2.cpp.

703{
705
706 KisImageWSP image = m_d->view->image();
707 if (image) {
708 if (!qFuzzyCompare(image->xRes(), image->yRes())) {
709 warnKrita << "WARNING: resolution of the image is anisotropic"
710 << ppVar(image->xRes())
711 << ppVar(image->yRes());
712 }
713
714 const qreal resolution = image->xRes();
715 unit.setFactor(resolution);
716 }
717
718 return unit;
719}
KoUnit unit() const override
double xRes() const
double yRes() const
@ Pixel
Definition KoUnit.h:82
void setFactor(qreal factor)
Definition KoUnit.h:122
static bool qFuzzyCompare(half p1, half p2)

References image(), m_d, KoUnit::Pixel, ppVar, qFuzzyCompare(), KoUnit::setFactor(), unit(), warnKrita, KisImage::xRes(), and KisImage::yRes().

◆ updateCanvas [1/2]

void KisCanvas2::updateCanvas ( )
slot

Update the entire canvas area.

Definition at line 1240 of file kis_canvas2.cpp.

1241{
1243}

References updateCanvasWidgetImpl().

◆ updateCanvas() [2/2]

void KisCanvas2::updateCanvas ( const QRectF & rc)
overridevirtual

Tell the canvas to repaint the specified rectangle. The coordinates are document coordinates, not view coordinates.

Implements KoCanvasBase.

Definition at line 1252 of file kis_canvas2.cpp.

1253{
1254 // updateCanvas is called from tools, never from the projection
1255 // updates, so no need to prescale!
1256 QRect widgetRect = m_d->docUpdateRectToWidget(documentRect);
1257 if (!widgetRect.isEmpty()) {
1258 updateCanvasWidgetImpl(widgetRect);
1259 }
1260}

References m_d, and updateCanvasWidgetImpl().

◆ updateCanvasDecorations [1/2]

void KisCanvas2::updateCanvasDecorations ( )
slot

Definition at line 1271 of file kis_canvas2.cpp.

1272{
1273 m_d->savedOverlayUpdateRect = m_d->canvasWidget->widget()->rect();
1275}
void requestCanvasUpdateMaybeCompressed()

References m_d, and requestCanvasUpdateMaybeCompressed().

◆ updateCanvasDecorations [2/2]

void KisCanvas2::updateCanvasDecorations ( const QRectF & docRect)
slot

Definition at line 1277 of file kis_canvas2.cpp.

1278{
1279 QRect widgetRect = m_d->docUpdateRectToWidget(docRect);
1280 if (!widgetRect.isEmpty()) {
1281 m_d->savedOverlayUpdateRect |= widgetRect;
1283 }
1284}

References m_d, and requestCanvasUpdateMaybeCompressed().

◆ updateCanvasProjection [1/2]

void KisCanvas2::updateCanvasProjection ( )
privateslot

Definition at line 1058 of file kis_canvas2.cpp.

1059{
1060 auto tryIssueCanvasUpdates = [this](const QRect &vRect) {
1061 if (!m_d->isBatchUpdateActive) {
1062 // TODO: Implement info->dirtyViewportRect() for KisOpenGLCanvas2 to avoid updating whole canvas
1063 if (m_d->currentCanvasIsOpenGL) {
1064 m_d->savedCanvasProjectionUpdateRect |= vRect;
1065
1066 // we already had a compression in frameRenderStartCompressor, so force the update directly
1068 } else if (/* !m_d->currentCanvasIsOpenGL && */ !vRect.isEmpty()) {
1069 m_d->savedCanvasProjectionUpdateRect |= m_d->coordinatesConverter->viewportToWidget(vRect).toAlignedRect();
1070
1071 // we already had a compression in frameRenderStartCompressor, so force the update directly
1073 }
1074 }
1075 };
1076
1077 auto uploadData = [this, tryIssueCanvasUpdates](const QVector<KisUpdateInfoSP> &infoObjects) {
1078 QVector<QRect> viewportRects = m_d->canvasWidget->updateCanvasProjection(infoObjects);
1079 const QRect vRect = std::accumulate(viewportRects.constBegin(), viewportRects.constEnd(),
1080 QRect(), std::bit_or<QRect>());
1081
1082 tryIssueCanvasUpdates(vRect);
1083 };
1084
1085 bool shouldExplicitlyIssueUpdates = false;
1086
1087 QVector<KisUpdateInfoSP> infoObjects;
1088 KisUpdateInfoList originalInfoObjects;
1089 m_d->projectionUpdatesCompressor.takeUpdateInfo(originalInfoObjects);
1090
1091 for (auto it = originalInfoObjects.constBegin();
1092 it != originalInfoObjects.constEnd();
1093 ++it) {
1094
1095 KisUpdateInfoSP info = *it;
1096
1097 const KisMarkerUpdateInfo *batchInfo = dynamic_cast<const KisMarkerUpdateInfo*>(info.data());
1098 if (batchInfo) {
1099 if (!infoObjects.isEmpty()) {
1100 uploadData(infoObjects);
1101 infoObjects.clear();
1102 }
1103
1104 if (batchInfo->type() == KisMarkerUpdateInfo::StartBatch) {
1105 m_d->isBatchUpdateActive++;
1106 } else if (batchInfo->type() == KisMarkerUpdateInfo::EndBatch) {
1107 m_d->isBatchUpdateActive--;
1108 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->isBatchUpdateActive >= 0);
1109 if (m_d->isBatchUpdateActive == 0) {
1110 shouldExplicitlyIssueUpdates = true;
1111 }
1112 } else if (batchInfo->type() == KisMarkerUpdateInfo::BlockLodUpdates) {
1113 m_d->canvasWidget->setLodResetInProgress(true);
1114 } else if (batchInfo->type() == KisMarkerUpdateInfo::UnblockLodUpdates) {
1115 m_d->canvasWidget->setLodResetInProgress(false);
1116 shouldExplicitlyIssueUpdates = true;
1117 }
1118 } else {
1119 infoObjects << info;
1120 }
1121 }
1122
1123 if (!infoObjects.isEmpty()) {
1124 uploadData(infoObjects);
1125 } else if (shouldExplicitlyIssueUpdates) {
1126 tryIssueCanvasUpdates(m_d->coordinatesConverter->imageRectInImagePixels());
1127 }
1128}

References KisMarkerUpdateInfo::BlockLodUpdates, KisSharedPtr< T >::data(), KisMarkerUpdateInfo::EndBatch, KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, slotDoCanvasUpdate(), KisMarkerUpdateInfo::StartBatch, KisMarkerUpdateInfo::type(), and KisMarkerUpdateInfo::UnblockLodUpdates.

◆ updateCanvasProjection [2/2]

void KisCanvas2::updateCanvasProjection ( const QRectF & docRect)
slot

Definition at line 1262 of file kis_canvas2.cpp.

1263{
1264 QRect widgetRect = m_d->docUpdateRectToWidget(docRect);
1265 if (!widgetRect.isEmpty()) {
1266 m_d->savedCanvasProjectionUpdateRect |= widgetRect;
1268 }
1269}

References m_d, and requestCanvasUpdateMaybeCompressed().

◆ updateCanvasRequested

void KisCanvas2::updateCanvasRequested ( const QRect & rc)
signal

◆ updateCanvasScene

void KisCanvas2::updateCanvasScene ( )
slot

Definition at line 1307 of file kis_canvas2.cpp.

1308{
1309 m_d->updateSceneRequested = true;
1311}

References m_d, and requestCanvasUpdateMaybeCompressed().

◆ updateCanvasToolOutlineDoc

void KisCanvas2::updateCanvasToolOutlineDoc ( const QRectF & docRect)
slot

Definition at line 1286 of file kis_canvas2.cpp.

1287{
1288 QRect widgetRect = m_d->docUpdateRectToWidget(docRect);
1289 if (!widgetRect.isEmpty()) {
1290 updateCanvasToolOutlineWdg(widgetRect);
1291 }
1292}
void updateCanvasToolOutlineWdg(const QRect &widgetRect)

References m_d, and updateCanvasToolOutlineWdg().

◆ updateCanvasToolOutlineWdg

void KisCanvas2::updateCanvasToolOutlineWdg ( const QRect & widgetRect)
slot

Definition at line 1294 of file kis_canvas2.cpp.

1295{
1296 QRect rect = widgetRect & m_d->canvasWidget->widget()->rect();
1297 if (!rect.isEmpty()) {
1298 m_d->savedOverlayUpdateRect |= rect;
1299#ifdef HAVE_NO_QT_UPDATE_COMPRESSIO
1300 m_d->canvasUpdateCompressor.start();
1301#else
1303#endif
1304 }
1305}

References m_d, and slotDoCanvasUpdate().

◆ updateCanvasWidgetImpl()

void KisCanvas2::updateCanvasWidgetImpl ( const QRect & rc = QRect())
private

Definition at line 1224 of file kis_canvas2.cpp.

1225{
1226 QRect rect = m_d->canvasWidget->widget()->rect();
1227 if (!rc.isEmpty()) {
1228 rect &= rc;
1229 if (rect.isEmpty()) {
1230 return;
1231 }
1232 }
1233 // We don't know if it's the canvas projection or the overlay that's
1234 // changed, so we update both.
1235 m_d->savedCanvasProjectionUpdateRect |= rect;
1236 m_d->savedOverlayUpdateRect |= rect;
1238}

References m_d, and requestCanvasUpdateMaybeCompressed().

◆ updateProofingState()

void KisCanvas2::updateProofingState ( )

Definition at line 970 of file kis_canvas2.cpp.

971{
972 KoColorConversionTransformation::ConversionFlags displayFlags = m_d->proofingConfig->displayFlags;
973 displayFlags.setFlag(KoColorConversionTransformation::SoftProofing, false);
974
975 if (image()->colorSpace()->colorDepthId().id().contains("U")) {
976 displayFlags.setFlag(KoColorConversionTransformation::SoftProofing, imageView()->softProofing());
977 displayFlags.setFlag(KoColorConversionTransformation::GamutCheck, imageView()->gamutCheck());
978 }
979 m_d->proofingConfig->displayFlags = displayFlags;
980 m_d->proofingConfigUpdated = true;
981
982 KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->multiSurfaceState);
983 auto newState = m_d->multiSurfaceSetupManager.onProofingChanged(*m_d->multiSurfaceState, m_d->proofingConfig);
984 m_d->assignChangedMultiSurfaceState(newState);
985}

References KoColorConversionTransformation::GamutCheck, image(), imageView(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, and KoColorConversionTransformation::SoftProofing.

◆ viewConverter() [1/2]

const KoViewConverter * KisCanvas2::viewConverter ( ) const
overridevirtual

Return the viewConverter for this view.

Returns
the viewConverter for this view.

Implements KoCanvasBase.

Definition at line 676 of file kis_canvas2.cpp.

677{
678 return m_d->coordinatesConverter;
679}

References m_d.

◆ viewConverter() [2/2]

KoViewConverter * KisCanvas2::viewConverter ( )
overridevirtual

Implements KoCanvasBase.

Definition at line 681 of file kis_canvas2.cpp.

682{
683 return m_d->coordinatesConverter;
684}

References m_d.

◆ viewManager()

KisViewManager * KisCanvas2::viewManager ( ) const

Definition at line 1401 of file kis_canvas2.cpp.

1402{
1403 if (m_d->view) {
1404 return m_d->view->viewManager();
1405 }
1406 return 0;
1407}

References m_d.

◆ wrapAroundViewingMode()

bool KisCanvas2::wrapAroundViewingMode ( ) const

Definition at line 1628 of file kis_canvas2.cpp.

1629{
1630 return m_d->canvasWidget->wrapAroundViewingMode();
1631}

References m_d.

◆ wrapAroundViewingModeAxis()

WrapAroundAxis KisCanvas2::wrapAroundViewingModeAxis ( ) const

Definition at line 1639 of file kis_canvas2.cpp.

1640{
1641 return m_d->canvasWidget->wrapAroundViewingModeAxis();
1642}

References m_d.

◆ xAxisMirrored

bool KisCanvas2::xAxisMirrored ( ) const
slot

Bools indicating canvasmirroring.

Definition at line 551 of file kis_canvas2.cpp.

552{
553 return m_d->coordinatesConverter->xAxisMirrored();
554}

References m_d.

◆ yAxisMirrored

bool KisCanvas2::yAxisMirrored ( ) const
slot

Definition at line 556 of file kis_canvas2.cpp.

557{
558 return m_d->coordinatesConverter->yAxisMirrored();
559}

References m_d.

Friends And Related Symbol Documentation

◆ KisView

friend class KisView
friend

Definition at line 346 of file kis_canvas2.h.

Member Data Documentation

◆ animationPlayer

QScopedPointer<KisCanvasAnimationState> KisCanvas2::animationPlayer

Definition at line 244 of file kis_canvas2.cpp.

◆ bootstrapLodBlocked

bool KisCanvas2::bootstrapLodBlocked = false

Definition at line 247 of file kis_canvas2.cpp.

◆ canvasUpdateCompressor

KisSignalCompressor KisCanvas2::canvasUpdateCompressor

Definition at line 230 of file kis_canvas2.cpp.

◆ canvasWidget

const QWidget * KisCanvas2::canvasWidget = 0

Definition at line 219 of file kis_canvas2.cpp.

◆ channelFlags

QBitArray KisCanvas2::channelFlags

Definition at line 236 of file kis_canvas2.cpp.

◆ coordinatesConverter

const KisCoordinatesConverter * KisCanvas2::coordinatesConverter = 0

Definition at line 217 of file kis_canvas2.cpp.

◆ currentCanvasIsOpenGL

bool KisCanvas2::currentCanvasIsOpenGL = true

Definition at line 222 of file kis_canvas2.cpp.

◆ currentlyActiveShapeManager

QPointer<KoShapeManager> KisCanvas2::currentlyActiveShapeManager

Definition at line 248 of file kis_canvas2.cpp.

◆ displayColorConverter

KisDisplayColorConverter * KisCanvas2::displayColorConverter

Definition at line 241 of file kis_canvas2.cpp.

◆ frameCache

KisAnimationFrameCacheSP KisCanvas2::frameCache

Definition at line 245 of file kis_canvas2.cpp.

◆ frameRenderStartCompressor

KisSignalCompressor KisCanvas2::frameRenderStartCompressor

Definition at line 253 of file kis_canvas2.cpp.

◆ groupModeShapeWrapper

std::optional<ShapeLifetimeWrapper> KisCanvas2::groupModeShapeWrapper

Definition at line 223 of file kis_canvas2.cpp.

◆ inputActionGroupsMask

KisInputActionGroupsMask KisCanvas2::inputActionGroupsMask = AllActionGroup

Definition at line 249 of file kis_canvas2.cpp.

◆ inputActionGroupsMaskInterface

KisInputActionGroupsMaskInterface::SharedInterface KisCanvas2::inputActionGroupsMaskInterface

Definition at line 251 of file kis_canvas2.cpp.

◆ isBatchUpdateActive

int KisCanvas2::isBatchUpdateActive = 0

Definition at line 261 of file kis_canvas2.cpp.

◆ lodPreferredInImage

bool KisCanvas2::lodPreferredInImage = false

Definition at line 246 of file kis_canvas2.cpp.

◆ m_d

KisCanvas2Private* const KisCanvas2::m_d
private

Definition at line 348 of file kis_canvas2.h.

◆ multiSurfaceSetupManager

KisMultiSurfaceStateManager KisCanvas2::multiSurfaceSetupManager

Definition at line 268 of file kis_canvas2.cpp.

◆ multiSurfaceState

std::optional<KisMultiSurfaceStateManager::State> KisCanvas2::multiSurfaceState

Definition at line 269 of file kis_canvas2.cpp.

◆ openGLFilterMode

KisOpenGL::FilterMode KisCanvas2::openGLFilterMode = 0

Definition at line 225 of file kis_canvas2.cpp.

◆ popupPalette

KisPopupPalette * KisCanvas2::popupPalette = 0

Definition at line 240 of file kis_canvas2.cpp.

◆ prescaledProjection

KisPrescaledProjectionSP KisCanvas2::prescaledProjection

Definition at line 227 of file kis_canvas2.cpp.

◆ projectionUpdatesCompressor

KisCanvasUpdatesCompressor KisCanvas2::projectionUpdatesCompressor

Definition at line 243 of file kis_canvas2.cpp.

◆ proofingConfig

KisProofingConfigurationSP KisCanvas2::proofingConfig

Definition at line 237 of file kis_canvas2.cpp.

◆ proofingConfigUpdated

bool KisCanvas2::proofingConfigUpdated = false

Definition at line 238 of file kis_canvas2.cpp.

◆ q

KisCanvas2* KisCanvas2::q = 0

Definition at line 216 of file kis_canvas2.cpp.

◆ referencesBoundsUpdateCompressor

KisSignalCompressor KisCanvas2::referencesBoundsUpdateCompressor

Definition at line 256 of file kis_canvas2.cpp.

◆ regionOfInterest

QRect KisCanvas2::regionOfInterest

Definition at line 257 of file kis_canvas2.cpp.

◆ regionOfInterestMargin

qreal KisCanvas2::regionOfInterestMargin = 0.25

Definition at line 258 of file kis_canvas2.cpp.

◆ regionOfInterestUpdateCompressor

KisSignalCompressor KisCanvas2::regionOfInterestUpdateCompressor

Definition at line 255 of file kis_canvas2.cpp.

◆ renderingLimit

QRect KisCanvas2::renderingLimit

Definition at line 260 of file kis_canvas2.cpp.

◆ savedCanvasProjectionUpdateRect

QRect KisCanvas2::savedCanvasProjectionUpdateRect

Definition at line 232 of file kis_canvas2.cpp.

◆ savedOverlayUpdateRect

QRect KisCanvas2::savedOverlayUpdateRect

Definition at line 233 of file kis_canvas2.cpp.

◆ selectedShapesProxy

KoSelectedShapesProxy * KisCanvas2::selectedShapesProxy

Definition at line 221 of file kis_canvas2.cpp.

◆ shapeManager

KoShapeManager * KisCanvas2::shapeManager

Definition at line 220 of file kis_canvas2.cpp.

◆ toolProxy

KoToolProxy * KisCanvas2::toolProxy

Definition at line 226 of file kis_canvas2.cpp.

◆ updateSceneRequested

bool KisCanvas2::updateSceneRequested = false

Definition at line 234 of file kis_canvas2.cpp.

◆ view

QPointer<KisView> KisCanvas2::view

Definition at line 218 of file kis_canvas2.cpp.


The documentation for this class was generated from the following files: