Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_prescaled_projection.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_PRESCALED_PROJECTION_H
7#define KIS_PRESCALED_PROJECTION_H
8
9#include <QObject>
10
11#include <kritaui_export.h>
12#include <kis_shared.h>
13
15class QImage;
16class QRect;
17class QSize;
18class QPainter;
19
20class KoColorProfile;
24class KisCanvasState;
25
26#include <kis_types.h>
27#include "kis_ui_types.h"
28
29
37class KRITAUI_EXPORT KisPrescaledProjection : public QObject, public KisShared
38{
39 Q_OBJECT
40public:
41
43 ~KisPrescaledProjection() override;
44
45 void setImage(KisImageWSP image);
46
51 QImage prescaledQImage() const;
52
53 void setCoordinatesConverter(KisCoordinatesConverter *coordinatesConverter);
54
55public Q_SLOTS:
56
63 KisUpdateInfoSP updateCache(const QRect &dirtyImageRect);
64
70 void recalculateCache(KisUpdateInfoSP info);
71
75 void updateSettings();
76
77 void notifyCanvasStateChanged(const KisCanvasState &state);
78
85 void slotImageSizeChanged(qint32 w, qint32 h);
86
91 void notifyCanvasSizeChanged(const QSize &widgetSize);
92
96 void setDisplayConfig(const KisDisplayConfig &config);
97
98 void setChannelFlags(const QBitArray &channelFlags);
99
100 void setDisplayFilter(QSharedPointer<KisDisplayFilter> displayFilter);
101
107 void preScale();
108
109private:
110
111 friend class KisPrescaledProjectionTest;
112
115
116 void updateViewportSize();
117
122 void viewportMoved(const QPointF &offset);
123
134 KisPPUpdateInfoSP getInitialUpdateInformation(const QRect &dirtyImageRect);
135
148 void fillInUpdateInformation(const QRect &viewportRect,
149 KisPPUpdateInfoSP info);
150
156 void updateScaledImage(KisPPUpdateInfoSP info);
157
163 void drawUsingBackend(QPainter &gc, KisPPUpdateInfoSP info);
164
165 struct Private;
166 Private * const m_d;
167};
168
169#endif
KisDisplayConfig This class keeps track of the color management configuration for image to display....
The KisDisplayFilter class is the base class for filters that are applied by the canvas to the projec...
KisPrescaledProjection operator=(const KisPrescaledProjection &)
KisPrescaledProjection(const KisPrescaledProjection &)