Krita Source Code Documentation
Loading...
Searching...
No Matches
Canvas.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_CANVAS_H
7#define LIBKIS_CANVAS_H
8
9#include <QObject>
10
11#include "kritalibkis_export.h"
12#include "libkis.h"
13
14class KoCanvasBase;
16
22class KRITALIBKIS_EXPORT Canvas : public QObject
23{
24 Q_OBJECT
25
26public:
27 explicit Canvas(KoCanvasBase *canvas, QObject *parent = 0);
28 ~Canvas() override;
29
30 bool operator==(const Canvas &other) const;
31 bool operator!=(const Canvas &other) const;
32
33public Q_SLOTS:
34
38 qreal zoomLevel() const;
39
43 void setZoomLevel(qreal value);
44
48 void setPreferredCenter(const QPointF& imagePos);
49
53 QPointF preferredCenter() const;
54
58 void pan(const QPoint& offset);
59
63 void resetZoom();
64
68 qreal rotation() const;
69
73 void setRotation(qreal angle);
74
78 void resetRotation();
79
83 bool mirror() const;
84
88 void setMirror(bool value);
89
94 bool wrapAroundMode() const;
95
99 void setWrapAroundMode(bool enable);
100
105 bool levelOfDetailMode() const;
106
110 void setLevelOfDetailMode(bool enable);
111
115 View *view() const;
116
117
118private:
119
120 friend class ManagedColor;
121
122 KisDisplayColorConverter *displayColorConverter() const;
123
124 struct Private;
125 Private *const d;
126
127};
128
129#endif // LIBKIS_CANVAS_H
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
bool operator!=(const KoID &v1, const KoID &v2)
Definition KoID.h:103
Private *const d
Definition Canvas.h:125
The ManagedColor class is a class to handle colors that are color managed. A managed color is a color...
Definition View.h:25