Code

Move all of the snapper code to 2geom
[inkscape.git] / src / guide-snapper.h
1 #ifndef SEEN_GUIDE_SNAPPER_H
2 #define SEEN_GUIDE_SNAPPER_H
4 /**
5  *  \file guide-snapper.h
6  *  \brief Snapping things to guides.
7  *
8  * Authors:
9  *   Lauris Kaplinski <lauris@kaplinski.com>
10  *   Frank Felfe <innerspace@iname.com>
11  *   Carl Hetherington <inkscape@carlh.net>
12  *
13  * Copyright (C) 1999-2002 Authors 
14  *
15  * Released under GNU GPL, read the file 'COPYING' for more information
16  */
18 #include "libnr/nr-forward.h"
19 #include "libnr/nr-coord.h"
20 #include "line-snapper.h"
22 struct SPNamedView;
24 namespace Inkscape
25 {
27 /// Snap to guides
28 class GuideSnapper : public LineSnapper
29 {
30 public:
31     GuideSnapper(SPNamedView const *nv, Geom::Coord const d);    
32     bool ThisSnapperMightSnap() const;
34 private:
35     LineList _getSnapLines(Geom::Point const &p) const;    
36     void _addSnappedLine(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance, Geom::Point const normal_to_line, Geom::Point const point_on_line) const;
37 };
39 }
41 #endif
45 /*
46   Local Variables:
47   mode:c++
48   c-file-style:"stroustrup"
49   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
50   indent-tabs-mode:nil
51   fill-column:99
52   End:
53 */
54 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :