krita/ui
KisProjectionBackend Class Reference
KisProjectionBackend ia an abstract class represinting an object that can store a cache of KisImage projection. More...
#include <kis_projection_backend.h>

Public Member Functions | |
| virtual | ~KisProjectionBackend () |
| virtual void | alignSourceRect (QRect &rect, qreal scale) |
| virtual void | drawFromOriginalImage (QPainter &gc, const QRect &imageRect, const QRectF &viewportRect, qint32 borderWidth, QPainter::RenderHints renderHints)=0 |
| virtual KisImagePatch | getNearestPatch (qreal scaleX, qreal scaleY, const QRect &requestedRect, qint32 borderWidth)=0 |
| virtual void | setDirty (const QRect &rc)=0 |
| virtual void | setImage (KisImageWSP image)=0 |
| virtual void | setImageSize (qint32 w, qint32 h)=0 |
| virtual void | setMonitorProfile (const KoColorProfile *monitorProfile)=0 |
Detailed Description
KisProjectionBackend ia an abstract class represinting 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 37 of file kis_projection_backend.h.
Constructor & Destructor Documentation
| KisProjectionBackend::~KisProjectionBackend | ( | ) | [virtual] |
Definition at line 29 of file kis_projection_backend.cpp.
Member Function Documentation
| 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 33 of file kis_projection_backend.cpp.
| virtual void KisProjectionBackend::drawFromOriginalImage | ( | QPainter & | gc, | |
| const QRect & | imageRect, | |||
| const QRectF & | viewportRect, | |||
| qint32 | borderWidth, | |||
| QPainter::RenderHints | renderHints | |||
| ) | [pure virtual] |
Draws a piece of original image onto 's canvas - area in KisImage pixels where to read from - area in canvas pixels where to write to If and don't agree, the image will be scaled has the same meaning as in getNearestPatch - hints, transmitted to QPainter during darwing.
Implemented in KisImagePyramid, and KisProjectionCache.
| virtual KisImagePatch KisProjectionBackend::getNearestPatch | ( | qreal | scaleX, | |
| qreal | scaleY, | |||
| const QRect & | requestedRect, | |||
| qint32 | borderWidth | |||
| ) | [pure virtual] |
Get a patch from a backend that can draw a on some QPainter in future.
and 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 is non-zero, will be axpended by 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, and KisProjectionCache.
| virtual void KisProjectionBackend::setDirty | ( | const QRect & | rc | ) | [pure virtual] |
Updates (in KisImage pixels) from the base image.
Implemented in KisImagePyramid, and KisProjectionCache.
| virtual void KisProjectionBackend::setImage | ( | KisImageWSP | image | ) | [pure virtual] |
Those methods are related to KisPrescaledProjection's equivalents.
Implemented in KisImagePyramid, and KisProjectionCache.
| virtual void KisProjectionBackend::setImageSize | ( | qint32 | w, | |
| qint32 | h | |||
| ) | [pure virtual] |
Implemented in KisImagePyramid, and KisProjectionCache.
| virtual void KisProjectionBackend::setMonitorProfile | ( | const KoColorProfile * | monitorProfile | ) | [pure virtual] |
Implemented in KisImagePyramid, and KisProjectionCache.
The documentation for this class was generated from the following files:
