krita/ui
KisProjectionCache Class Reference
The projection cache papers over the option to cache the image projection as one big qimage, to not cache it as a qimage at all, or in any other way we have not invented yet. More...
#include <kis_projection_cache.h>

Public Member Functions | |
| KisProjectionCache () | |
| virtual | ~KisProjectionCache () |
| void | drawFromOriginalImage (QPainter &gc, const QRect &imageRect, const QRectF &viewportRect, qint32 borderWidth, QPainter::RenderHints renderHints) |
| KisImagePatch | getNearestPatch (qreal scaleX, qreal scaleY, const QRect &requestedRect, qint32 borderWidth) |
| void | setCacheKisImageAsQImage (bool toggle) |
| void | setDirty (const QRect &rc) |
| void | setImage (KisImageWSP image) |
| void | setImageSize (qint32 w, qint32 h) |
| void | setMonitorProfile (const KoColorProfile *monitorProfile) |
Detailed Description
The projection cache papers over the option to cache the image projection as one big qimage, to not cache it as a qimage at all, or in any other way we have not invented yet.
Definition at line 36 of file kis_projection_cache.h.
Constructor & Destructor Documentation
| KisProjectionCache::KisProjectionCache | ( | ) |
Definition at line 29 of file kis_projection_cache.cpp.
| virtual KisProjectionCache::~KisProjectionCache | ( | ) | [inline, virtual] |
Definition at line 40 of file kis_projection_cache.h.
Member Function Documentation
| void KisProjectionCache::drawFromOriginalImage | ( | QPainter & | gc, | |
| const QRect & | imageRect, | |||
| const QRectF & | viewportRect, | |||
| qint32 | borderWidth, | |||
| QPainter::RenderHints | renderHints | |||
| ) | [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.
Implements KisProjectionBackend.
Definition at line 171 of file kis_projection_cache.cpp.
| KisImagePatch KisProjectionCache::getNearestPatch | ( | qreal | scaleX, | |
| qreal | scaleY, | |||
| const QRect & | requestedRect, | |||
| qint32 | borderWidth | |||
| ) | [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.
Implements KisProjectionBackend.
Definition at line 137 of file kis_projection_cache.cpp.
| void KisProjectionCache::setCacheKisImageAsQImage | ( | bool | toggle | ) |
Definition at line 44 of file kis_projection_cache.cpp.
| void KisProjectionCache::setDirty | ( | const QRect & | rc | ) | [virtual] |
Updates (in KisImage pixels) from the base image.
Implements KisProjectionBackend.
Definition at line 91 of file kis_projection_cache.cpp.
| void KisProjectionCache::setImage | ( | KisImageWSP | image | ) | [virtual] |
Those methods are related to KisPrescaledProjection's equivalents.
Implements KisProjectionBackend.
Definition at line 35 of file kis_projection_cache.cpp.
| void KisProjectionCache::setImageSize | ( | qint32 | w, | |
| qint32 | h | |||
| ) | [virtual] |
Implements KisProjectionBackend.
Definition at line 60 of file kis_projection_cache.cpp.
| void KisProjectionCache::setMonitorProfile | ( | const KoColorProfile * | monitorProfile | ) | [virtual] |
Implements KisProjectionBackend.
Definition at line 86 of file kis_projection_cache.cpp.
The documentation for this class was generated from the following files:
