Krita Source Code Documentation
Loading...
Searching...
No Matches
KoClipPath.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2011 Jan Hambrecht <jaham@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KOCLIPPATH_H
8#define KOCLIPPATH_H
9
10#include "kritaflake_export.h"
11
12#include <QList>
13#include <QSharedDataPointer>
14#include <qnamespace.h>
16
17class KoShape;
18class KoPathShape;
19class QPainter;
20class QTransform;
21class QPainterPath;
22class QSizeF;
23
25class KRITAFLAKE_EXPORT KoClipPath
26{
27public:
28
37
38 // Work around MSVC inability to generate copy ops with QSharedDataPointer.
39 KoClipPath(const KoClipPath &);
40 KoClipPath &operator=(const KoClipPath &);
41
42 KoClipPath *clone() const;
43
45
47 void setClipRule(Qt::FillRule clipRule);
48
50 Qt::FillRule clipRule() const;
51
53 QPainterPath path() const;
54
56 QPainterPath pathForSize(const QSizeF &size) const;
57
59 QList<KoPathShape*> clipPathShapes() const;
60
61 QList<KoShape*> clipShapes() const;
62
70 QTransform clipDataTransformation(KoShape *clippedShape) const;
71
73 static void applyClipping(KoShape *clippedShape, QPainter &painter);
74
75private:
76 class Private;
77 QSharedDataPointer<Private> d;
78};
79
80#endif // KOCLIPPATH_H
Clip path used to clip shapes.
Qt::FillRule clipRule() const
Returns the current clip rule.
QSharedDataPointer< Private > d
Definition KoClipPath.h:77
KoFlake::CoordinateSystem coordinates() const
The position of a path point within a path shape.
Definition KoPathShape.h:63