Krita Source Code Documentation
Loading...
Searching...
No Matches
KoMarker.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2011 Thorsten Zachmann <zachmann@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KOMARKER_H
8#define KOMARKER_H
9
10#include <QMetaType>
11#include <QSharedData>
12
13#include "kritaflake_export.h"
14#include <KoFlake.h>
15
16#include <QDomDocument>
17
20class QString;
21class QPainterPath;
22class KoShape;
23class QPainter;
24class KoShapeStroke;
25
26class KRITAFLAKE_EXPORT KoMarker : public QSharedData
27{
28public:
29 KoMarker();
30 ~KoMarker();
31
37 QString name() const;
38
39 KoMarker(const KoMarker &rhs);
40 bool operator==(const KoMarker &other) const;
41
44 UserSpaceOnUse
45 };
46
47 void setCoordinateSystem(MarkerCoordinateSystem value);
49
50 static MarkerCoordinateSystem coordinateSystemFromString(const QString &value);
51 static QString coordinateSystemToString(MarkerCoordinateSystem value);
52
53 void setReferencePoint(const QPointF &value);
54 QPointF referencePoint() const;
55
56 void setReferenceSize(const QSizeF &size);
57 QSizeF referenceSize() const;
58
59 bool hasAutoOrientation() const;
60 void setAutoOrientation(bool value);
61
62 // measured in radians!
63 qreal explicitOrientation() const;
64
65 // measured in radians!
66 void setExplicitOrientation(qreal value);
67
68 void setShapes(const QList<KoShape*> &shapes);
70
75 void paintAtPosition(QPainter *painter, const QPointF &pos, qreal strokeWidth, qreal nodeAngle);
76
80 qreal maxInset(qreal strokeWidth) const;
81
86 QRectF boundingRect(qreal strokeWidth, qreal nodeAngle) const;
87
92 QPainterPath outline(qreal strokeWidth, qreal nodeAngle) const;
93
97 void drawPreview(QPainter *painter, const QRectF &previewRect,
98 const QPen &pen, KoFlake::MarkerPosition position);
99
100
101 void applyShapeStroke(const KoShape *shape, KoShapeStroke *stroke, const QPointF &pos, qreal strokeWidth, qreal nodeAngle);
102
103private:
104 class Private;
105 Private * const d;
106};
107
109
110#endif /* KOMARKER_H */
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
Private *const d
Definition KoMarker.h:105
qreal explicitOrientation() const
QSizeF referenceSize() const
QString name() const
QPointF referencePoint() const
bool hasAutoOrientation() const
MarkerCoordinateSystem coordinateSystem() const
QList< KoShape * > shapes() const
MarkerCoordinateSystem
Definition KoMarker.h:42
@ StrokeWidth
Definition KoMarker.h:43
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
MarkerPosition
Definition KoFlake.h:41