Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathPointData.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2006 Thorsten Zachmann <zachmann@kde.org>
3 SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KOPATHPOINTDATA_H
9#define KOPATHPOINTDATA_H
10
11#include "KoPathShape.h"
12#include <boost/operators.hpp>
13
17class KoPathPointData : public boost::equality_comparable<KoPathPointData>
18{
19public:
24
26 bool operator<(const KoPathPointData & other) const {
27 return pathShape < other.pathShape ||
28 (pathShape == other.pathShape &&
29 (pointIndex.first < other.pointIndex.first ||
30 (pointIndex.first == other.pointIndex.first &&
31 pointIndex.second < other.pointIndex.second)));
32
33 }
34 bool operator==(const KoPathPointData & other) const {
35 return pathShape == other.pathShape &&
36 pointIndex.first == other.pointIndex.first &&
37 pointIndex.second == other.pointIndex.second;
38 }
43};
44
45#endif
QPair< int, int > KoPathPointIndex
Definition KoPathShape.h:28
Describe a KoPathPoint by a KoPathShape and its indices.
KoPathPointIndex pointIndex
position of the point in the path shape
KoPathShape * pathShape
path shape the path point belongs too
bool operator<(const KoPathPointData &other) const
operator used for sorting
bool operator==(const KoPathPointData &other) const
KoPathPointData(KoPathShape *path, const KoPathPointIndex &pointIndex)
constructor
The position of a path point within a path shape.
Definition KoPathShape.h:63