1 #ifndef SEEN_SNAPPEDCURVE_H\r
2 #define SEEN_SNAPPEDCURVE_H\r
3 \r
4 /**\r
5 * \file src/snapped-curve.h\r
6 * \brief SnappedCurve class.\r
7 *\r
8 * Authors:\r
9 * Diederik van Lierop <mail@diedenrezi.nl>\r
10 *\r
11 * Released under GNU GPL, read the file 'COPYING' for more information.\r
12 */\r
13 \r
14 #include <vector>\r
15 #include <list>\r
16 #include "libnr/nr-coord.h"\r
17 #include "libnr/nr-point.h"\r
18 #include <libnr/nr-point-fns.h>\r
19 #include "snapped-point.h"\r
20 #include <2geom/forward.h>\r
21 \r
22 namespace Inkscape\r
23 {\r
24 \r
25 /// Class describing the result of an attempt to snap to a curve.\r
26 class SnappedCurve : public SnappedPoint\r
27 {\r
28 public:\r
29 SnappedCurve();\r
30 SnappedCurve(Geom::Point const &snapped_point, Geom::Coord const &snapped_distance, Geom::Coord const &snapped_tolerance, bool const &always_snap, bool const &fully_constrained, Geom::Curve const *curve);\r
31 ~SnappedCurve();\r
32 Inkscape::SnappedPoint intersect(SnappedCurve const &curve, Geom::Point const &p) const; //intersect with another SnappedCurve\r
33 \r
34 private:\r
35 Geom::Curve const *_curve;\r
36 };\r
37 \r
38 }\r
39 \r
40 bool getClosestCurve(std::list<Inkscape::SnappedCurve> const &list, Inkscape::SnappedCurve &result);\r
41 bool getClosestIntersectionCS(std::list<Inkscape::SnappedCurve> const &list, Geom::Point const &p, Inkscape::SnappedPoint &result);\r
42 \r
43 \r
44 #endif /* !SEEN_SNAPPEDCURVE_H */\r
45 \r
46 /*\r
47 Local Variables:\r
48 mode:c++\r
49 c-file-style:"stroustrup"\r
50 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
51 indent-tabs-mode:nil\r
52 fill-column:99\r
53 End:\r
54 */\r
55 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :\r