Code

After snapping, show a tooltip together with the snap indicator
[inkscape.git] / src / snapped-curve.h
1 #ifndef SEEN_SNAPPEDCURVE_H
2 #define SEEN_SNAPPEDCURVE_H
4 /**
5  *    \file src/snapped-curve.h
6  *    \brief SnappedCurve class.
7  *
8  *    Authors:
9  *      Diederik van Lierop <mail@diedenrezi.nl>
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"
18 #include <libnr/nr-point-fns.h>
19 #include "snapped-point.h"
20 #include <2geom/forward.h>
22 namespace Inkscape
23 {
25 /// Class describing the result of an attempt to snap to a curve.
26 class SnappedCurve : public SnappedPoint
27 {
28 public:
29     SnappedCurve();
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, SnapTargetType target);
31     ~SnappedCurve();
32     Inkscape::SnappedPoint intersect(SnappedCurve const &curve, Geom::Point const &p, Geom::Matrix dt2doc) const; //intersect with another SnappedCurve
34 private:
35     Geom::Curve const *_curve;
36 };
38 }
40 bool getClosestCurve(std::list<Inkscape::SnappedCurve> const &list, Inkscape::SnappedCurve &result);
41 bool getClosestIntersectionCS(std::list<Inkscape::SnappedCurve> const &list, Geom::Point const &p, Inkscape::SnappedPoint &result, Geom::Matrix dt2doc);
44 #endif /* !SEEN_SNAPPEDCURVE_H */
46 /*
47   Local Variables:
48   mode:c++
49   c-file-style:"stroustrup"
50   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
51   indent-tabs-mode:nil
52   fill-column:99
53   End:
54 */
55 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :