1 #ifndef SEEN_SNAPPEDPOINT_H
2 #define SEEN_SNAPPEDPOINT_H
4 /**
5 * \file src/snapped-point.h
6 * \brief SnappedPoint class.
7 *
8 * Authors:
9 * Mathieu Dimanche <mdimanche@free.fr>
10 *
11 * Released under GNU GPL, read the file 'COPYING' for more information.
12 */
14 #include <vector>
15 #include <list>
16 #include "libnr/nr-coord.h"
17 #include "libnr/nr-point.h"
19 namespace Inkscape
20 {
22 /// Class describing the result of an attempt to snap.
23 class SnappedPoint
24 {
25 public:
26 SnappedPoint();
27 SnappedPoint(::NR::Point p, ::NR::Coord d, bool at_intersection = false);
28 ~SnappedPoint();
30 NR::Coord getDistance() const;
31 NR::Point getPoint() const;
32 bool getAtIntersection() const {return _at_intersection;}
34 protected:
35 NR::Coord _distance;
36 NR::Point _point;
37 bool _at_intersection;
38 };
40 }
42 bool getClosestSP(std::list<Inkscape::SnappedPoint> &list, Inkscape::SnappedPoint &result);
45 #endif /* !SEEN_SNAPPEDPOINT_H */
47 /*
48 Local Variables:
49 mode:c++
50 c-file-style:"stroustrup"
51 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52 indent-tabs-mode:nil
53 fill-column:99
54 End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :