Code

Connector tool: make connectors avoid the convex hull of shapes.
[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 "snapped-point.h"
17 #include <2geom/forward.h>
19 namespace Inkscape
20 {
22 /// Class describing the result of an attempt to snap to a curve.
23 class SnappedCurve : public SnappedPoint
24 {
25 public:
26     SnappedCurve();
27     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, SnapSourceType source, long source_num, SnapTargetType target);
28     ~SnappedCurve();
29     Inkscape::SnappedPoint intersect(SnappedCurve const &curve, Geom::Point const &p, Geom::Matrix dt2doc) const; //intersect with another SnappedCurve
31 private:
32     Geom::Curve const *_curve;
33 };
35 }
37 bool getClosestCurve(std::list<Inkscape::SnappedCurve> const &list, Inkscape::SnappedCurve &result);
38 bool getClosestIntersectionCS(std::list<Inkscape::SnappedCurve> const &list, Geom::Point const &p, Inkscape::SnappedPoint &result, Geom::Matrix dt2doc);
41 #endif /* !SEEN_SNAPPEDCURVE_H */
43 /*
44   Local Variables:
45   mode:c++
46   c-file-style:"stroustrup"
47   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
48   indent-tabs-mode:nil
49   fill-column:99
50   End:
51 */
52 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :