Code

Extensions. XAML export improvements.
[inkscape.git] / src / guide-snapper.h
index 654149f5c5fa90fbaaee64bc70803addd1896b11..5de1b56a4ae20474a183a8c17de683cf2bec2b35 100644 (file)
  *   Frank Felfe <innerspace@iname.com>
  *   Carl Hetherington <inkscape@carlh.net>
  *
- * Copyright (C) 1999-2002 Authors 
+ * Copyright (C) 1999-2002 Authors
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
-#include "libnr/nr-forward.h"
-#include "libnr/nr-coord.h"
-#include "snapper.h"
+#include "line-snapper.h"
 
 struct SPNamedView;
 
@@ -28,11 +26,17 @@ namespace Inkscape
 class GuideSnapper : public LineSnapper
 {
 public:
-    GuideSnapper() {}
-    GuideSnapper(SPNamedView const *nv, NR::Coord const d);
+    GuideSnapper(SnapManager *sm, Geom::Coord const d);
+    bool ThisSnapperMightSnap() const;
+
+    Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
+    bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance
 
 private:
-    LineList _getSnapLines(NR::Point const &p) const;
+    LineList _getSnapLines(Geom::Point const &p) const;
+    void _addSnappedLine(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance,  SnapSourceType const &source, long source_num, Geom::Point const normal_to_line, Geom::Point const point_on_line) const;
+    void _addSnappedLinesOrigin(SnappedConstraints &sc, Geom::Point const origin, Geom::Coord const snapped_distance, SnapSourceType const &source, long source_num, bool constrained_snap) const;
+    void _addSnappedPoint(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source, long source_num, bool constrained_snap) const;
 };
 
 }