Krita Source Code Documentation
Loading...
Searching...
No Matches
KisProjectionBackend Class Referenceabstract

#include <kis_projection_backend.h>

+ Inheritance diagram for KisProjectionBackend:

Public Member Functions

virtual void alignSourceRect (QRect &rect, qreal scale)
 
virtual void drawFromOriginalImage (QPainter &gc, KisPPUpdateInfoSP info)=0
 
virtual KisImagePatch getNearestPatch (KisPPUpdateInfoSP info)=0
 
virtual void recalculateCache (KisPPUpdateInfoSP info)=0
 
virtual void setChannelFlags (const QBitArray &channelFlags)=0
 
virtual void setDisplayFilter (QSharedPointer< KisDisplayFilter > displayFilter)=0
 
virtual void setImage (KisImageWSP image)=0
 
virtual void setImageSize (qint32 w, qint32 h)=0
 
virtual void setMonitorProfile (const KoColorProfile *monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)=0
 
virtual void updateCache (const QRect &dirtyImageRect)=0
 
virtual ~KisProjectionBackend ()
 

Detailed Description

KisProjectionBackend is an abstract class representing an object that can store a cache of KisImage projection. More than that this object can perform some scaling operations that are based on "patches" paradigm

Definition at line 24 of file kis_projection_backend.h.

Constructor & Destructor Documentation

◆ ~KisProjectionBackend()

KisProjectionBackend::~KisProjectionBackend ( )
virtual

Definition at line 9 of file kis_projection_backend.cpp.

10{
11}

Member Function Documentation

◆ alignSourceRect()

void KisProjectionBackend::alignSourceRect ( QRect & rect,
qreal scale )
virtual

Some backends cannot work with arbitrary areas due to scaling stuff. That's why KisPrescaledProjection asks a backend to align an image rect before any operations.

Reimplemented in KisImagePyramid.

Definition at line 13 of file kis_projection_backend.cpp.

14{
15 Q_UNUSED(rect);
16 Q_UNUSED(scale);
17}

◆ drawFromOriginalImage()

virtual void KisProjectionBackend::drawFromOriginalImage ( QPainter & gc,
KisPPUpdateInfoSP info )
pure virtual

Draws a piece of original image onto gc 's canvas info.imageRect - area in KisImage pixels where to read from info.viewportRect - area in canvas pixels where to write to If info.imageRect and info.viewportRect don't agree, the image will be scaled info.borderWidth has the same meaning as in getNearestPatch info.renderHints - hints, transmitted to QPainter during drawing

Implemented in KisImagePyramid.

◆ getNearestPatch()

virtual KisImagePatch KisProjectionBackend::getNearestPatch ( KisPPUpdateInfoSP info)
pure virtual

Gets a patch from a backend that can draw a info.imageRect on some QPainter in future. info.scaleX and info.scaleY are the scales of planned drawing, btw, it doesn't mean that an QImage inside the patch will have these scales - it'll have the nearest suitable scale or even original scale (e.g. KisProjectionCache)

If info.borderWidth is non-zero, info.requestedRect will be expended by info.borderWidth pixels to all directions and image of this rect will actually be written to the patch's QImage. That is done to eliminate border effects in smooth scaling.

Implemented in KisImagePyramid.

◆ recalculateCache()

virtual void KisProjectionBackend::recalculateCache ( KisPPUpdateInfoSP info)
pure virtual

Prescales the cache of the backend. It is intended to be called from a separate thread where you can easily do the calculations. No data transfers with KisImage should happen during this phase

Implemented in KisImagePyramid.

◆ setChannelFlags()

virtual void KisProjectionBackend::setChannelFlags ( const QBitArray & channelFlags)
pure virtual

Implemented in KisImagePyramid.

◆ setDisplayFilter()

virtual void KisProjectionBackend::setDisplayFilter ( QSharedPointer< KisDisplayFilter > displayFilter)
pure virtual

Implemented in KisImagePyramid.

◆ setImage()

virtual void KisProjectionBackend::setImage ( KisImageWSP image)
pure virtual

Those methods are related to KisPrescaledProjection's equivalents

Implemented in KisImagePyramid.

◆ setImageSize()

virtual void KisProjectionBackend::setImageSize ( qint32 w,
qint32 h )
pure virtual

Implemented in KisImagePyramid.

◆ setMonitorProfile()

virtual void KisProjectionBackend::setMonitorProfile ( const KoColorProfile * monitorProfile,
KoColorConversionTransformation::Intent renderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags )
pure virtual

Implemented in KisImagePyramid.

◆ updateCache()

virtual void KisProjectionBackend::updateCache ( const QRect & dirtyImageRect)
pure virtual

Updates the cache of the backend by reading from an associated image. All data transfers with KisImage should happen here

Implemented in KisImagePyramid.


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