Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoPathPoint.h
Show All 25 Lines | |||||
26 | 26 | | |||
27 | #include <QFlags> | 27 | #include <QFlags> | ||
28 | 28 | | |||
29 | class KoPathShape; | 29 | class KoPathShape; | ||
30 | class QPointF; | 30 | class QPointF; | ||
31 | class QTransform; | 31 | class QTransform; | ||
32 | class QRectF; | 32 | class QRectF; | ||
33 | class QPainter; | 33 | class QPainter; | ||
34 | class KisHandlePainterHelper; | ||||
34 | 35 | | |||
35 | /** | 36 | /** | ||
36 | * @brief A KoPathPoint represents a point in a path. | 37 | * @brief A KoPathPoint represents a point in a path. | ||
37 | * | 38 | * | ||
38 | * A KoPathPoint stores a point in a path. Additional to this point | 39 | * A KoPathPoint stores a point in a path. Additional to this point | ||
39 | * 2 control points are stored. | 40 | * 2 control points are stored. | ||
40 | * controlPoint1 is used to describe the second point of a cubic | 41 | * controlPoint1 is used to describe the second point of a cubic | ||
41 | * bezier ending at the point. controlPoint2 is used to describe the | 42 | * bezier ending at the point. controlPoint2 is used to describe the | ||
Show All 33 Lines | 47 | public: | |||
75 | * @param properties describing the point | 76 | * @param properties describing the point | ||
76 | */ | 77 | */ | ||
77 | KoPathPoint(KoPathShape *path, const QPointF &point, PointProperties properties = Normal); | 78 | KoPathPoint(KoPathShape *path, const QPointF &point, PointProperties properties = Normal); | ||
78 | 79 | | |||
79 | /** | 80 | /** | ||
80 | * @brief Copy Constructor | 81 | * @brief Copy Constructor | ||
81 | */ | 82 | */ | ||
82 | KoPathPoint(const KoPathPoint &pathPoint); | 83 | KoPathPoint(const KoPathPoint &pathPoint); | ||
84 | KoPathPoint(const KoPathPoint &pathPoint, KoPathShape *newParent); | ||||
83 | 85 | | |||
84 | /** | 86 | /** | ||
85 | * @brief Assignment operator. | 87 | * @brief Assignment operator. | ||
86 | */ | 88 | */ | ||
87 | KoPathPoint& operator=(const KoPathPoint &other); | 89 | KoPathPoint& operator=(const KoPathPoint &other); | ||
88 | 90 | | |||
89 | /// Compare operator | 91 | /// Compare operator | ||
90 | bool operator == (const KoPathPoint &other) const; | 92 | bool operator == (const KoPathPoint &other) const; | ||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | |||||
207 | /** | 209 | /** | ||
208 | * Paints the path point with the actual brush and pen | 210 | * Paints the path point with the actual brush and pen | ||
209 | * @param painter used for painting the shape point | 211 | * @param painter used for painting the shape point | ||
210 | * @param handleRadius size of point handles in pixel | 212 | * @param handleRadius size of point handles in pixel | ||
211 | * @param types the points which should be painted | 213 | * @param types the points which should be painted | ||
212 | * @param active If true only the given active points are painted | 214 | * @param active If true only the given active points are painted | ||
213 | * If false all given points are used. | 215 | * If false all given points are used. | ||
214 | */ | 216 | */ | ||
215 | void paint(QPainter &painter, int handleRadius, PointTypes types, bool active = true); | 217 | void paint(KisHandlePainterHelper &handlesHelper, PointTypes types, bool active = true); | ||
216 | 218 | | |||
217 | /** | 219 | /** | ||
218 | * @brief Sets the parent path shape. | 220 | * @brief Sets the parent path shape. | ||
219 | * @param parent the new parent path shape | 221 | * @param parent the new parent path shape | ||
220 | */ | 222 | */ | ||
221 | void setParent(KoPathShape* parent); | 223 | void setParent(KoPathShape* parent); | ||
222 | 224 | | |||
223 | /** | 225 | /** | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |