Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/canvas/kis_projection_backend.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 38 | public: | |||
---|---|---|---|---|---|
45 | virtual void setImage(KisImageWSP image) = 0; | 45 | virtual void setImage(KisImageWSP image) = 0; | ||
46 | virtual void setImageSize(qint32 w, qint32 h) = 0; | 46 | virtual void setImageSize(qint32 w, qint32 h) = 0; | ||
47 | virtual void setMonitorProfile(const KoColorProfile* monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) = 0; | 47 | virtual void setMonitorProfile(const KoColorProfile* monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) = 0; | ||
48 | virtual void setChannelFlags(const QBitArray &channelFlags) = 0; | 48 | virtual void setChannelFlags(const QBitArray &channelFlags) = 0; | ||
49 | virtual void setDisplayFilter(QSharedPointer<KisDisplayFilter> displayFilter) = 0; | 49 | virtual void setDisplayFilter(QSharedPointer<KisDisplayFilter> displayFilter) = 0; | ||
50 | 50 | | |||
51 | /** | 51 | /** | ||
52 | * Updates the cache of the backend by reading from | 52 | * Updates the cache of the backend by reading from | ||
53 | * an accociated image. All data transfers with | 53 | * an associated image. All data transfers with | ||
54 | * KisImage should happen here | 54 | * KisImage should happen here | ||
55 | */ | 55 | */ | ||
56 | virtual void updateCache(const QRect &dirtyImageRect) = 0; | 56 | virtual void updateCache(const QRect &dirtyImageRect) = 0; | ||
57 | 57 | | |||
58 | /** | 58 | /** | ||
59 | * Prescales the cache of the backend. It is intended to be | 59 | * Prescales the cache of the backend. It is intended to be | ||
60 | * called from a separate thread where you can easily | 60 | * called from a separate thread where you can easily | ||
61 | * do the calculations. No data transfers with KisImage | 61 | * do the calculations. No data transfers with KisImage | ||
Show All 11 Lines | |||||
73 | /** | 73 | /** | ||
74 | * Gets a patch from a backend that can draw a info.imageRect on some | 74 | * Gets a patch from a backend that can draw a info.imageRect on some | ||
75 | * QPainter in future. info.scaleX and info.scaleY are the scales | 75 | * QPainter in future. info.scaleX and info.scaleY are the scales | ||
76 | * of planned drawing, btw, it doesn't mean that an QImage inside | 76 | * of planned drawing, btw, it doesn't mean that an QImage inside | ||
77 | * the patch will have these scales - it'll have the nearest suitable | 77 | * the patch will have these scales - it'll have the nearest suitable | ||
78 | * scale or even original scale (e.g. KisProjectionCache) | 78 | * scale or even original scale (e.g. KisProjectionCache) | ||
79 | * | 79 | * | ||
80 | * If info.borderWidth is non-zero, info.requestedRect will | 80 | * If info.borderWidth is non-zero, info.requestedRect will | ||
81 | * be axpended by info.borderWidth pixels to all directions and | 81 | * be expended by info.borderWidth pixels to all directions and | ||
82 | * image of this rect will actually be written to the patch's QImage. | 82 | * image of this rect will actually be written to the patch's QImage. | ||
83 | * That is done to eliminate border effects in smooth scaling. | 83 | * That is done to eliminate border effects in smooth scaling. | ||
84 | */ | 84 | */ | ||
85 | virtual KisImagePatch getNearestPatch(KisPPUpdateInfoSP info) = 0; | 85 | virtual KisImagePatch getNearestPatch(KisPPUpdateInfoSP info) = 0; | ||
86 | 86 | | |||
87 | /** | 87 | /** | ||
88 | * Draws a piece of original image onto @gc's canvas | 88 | * Draws a piece of original image onto @gc's canvas | ||
89 | * @param info.imageRect - area in KisImage pixels where to read from | 89 | * @param info.imageRect - area in KisImage pixels where to read from | ||
Show All 11 Lines |