Krita Source Code Documentation
Loading...
Searching...
No Matches
KoClipMask.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KOCLIPMASK_H
8#define KOCLIPMASK_H
9
10#include "kritaflake_export.h"
11
13#include <QList>
14#include <QSharedDataPointer>
15
16class KoShape;
17class QRectF;
18class QTransform;
19class QPointF;
20class QPainter;
21
22
23class KRITAFLAKE_EXPORT KoClipMask
24{
25public:
26 KoClipMask();
28
29 // Work around MSVC inability to generate copy ops with QSharedDataPointer.
30 KoClipMask(const KoClipMask &);
31 KoClipMask &operator=(const KoClipMask &);
32
33 KoClipMask *clone() const;
34
36 void setCoordinates(KoFlake::CoordinateSystem value);
37
39 void setContentCoordinates(KoFlake::CoordinateSystem value);
40
41 QRectF maskRect() const;
42 void setMaskRect(const QRectF &value);
43
45 void setShapes(const QList<KoShape *> &value);
46
47 bool isEmpty() const;
48
49 void setExtraShapeOffset(const QPointF &value);
50
51 void drawMask(QPainter *painter, KoShape *shape);
52
53private:
54 struct Private;
55 QSharedDataPointer<Private> m_d;
56};
57
58#endif // KOCLIPMASK_H
float value(const T *src, size_t ch)
QSharedDataPointer< Private > m_d
Definition KoClipMask.h:55
QRectF maskRect() const
KoFlake::CoordinateSystem contentCoordinates() const
KoFlake::CoordinateSystem coordinates() const
QList< KoShape * > shapes() const