Code

Refactoring SPColor to C++ and removing legacy CMYK implementation
[inkscape.git] / src / line-snapper.cpp
index a2c6b944bcc28ff10c36963b8fbb1bb142901cda..cf46671c88602b21d67780833263cbaf49208d4e 100644 (file)
@@ -8,13 +8,16 @@ Inkscape::LineSnapper::LineSnapper(SPNamedView const *nv, NR::Coord const d) : S
 
 }
 
-Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(NR::Point const &p,
-                                                          std::list<SPItem const *> const &it) const
+Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(Inkscape::Snapper::PointType const &t,
+                                                                                                       NR::Point const &p,
+                                                                                                       bool const &f,
+                                                       std::vector<NR::Point> &points_to_snap,
+                                                    std::list<SPItem const *> const &it) const
 {
     /* Snap along x (ie to vertical lines) */
-    Inkscape::SnappedPoint const v = _doConstrainedSnap(p, component_vectors[NR::X], it);
+    Inkscape::SnappedPoint const v = _doConstrainedSnap(t, p, f, points_to_snap, component_vectors[NR::X], it);
     /* Snap along y (ie to horizontal lines) */
-    Inkscape::SnappedPoint const h = _doConstrainedSnap(p, component_vectors[NR::Y], it);
+    Inkscape::SnappedPoint const h = _doConstrainedSnap(t, p, f, points_to_snap, component_vectors[NR::Y], it);
 
     /* If we snapped to both, combine the two results.  This is so that, for example,
     ** we snap nicely to the intersection of two guidelines.
@@ -34,9 +37,12 @@ Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(NR::Point const &p,
     return h;
 }
 
-Inkscape::SnappedPoint Inkscape::LineSnapper::_doConstrainedSnap(NR::Point const &p,
-                                                                 ConstraintLine const &c,
-                                                                 std::list<SPItem const *> const &it) const
+Inkscape::SnappedPoint Inkscape::LineSnapper::_doConstrainedSnap(Inkscape::Snapper::PointType const &t, 
+                                                                                                       NR::Point const &p,
+                                                    bool const &f,
+                                                       std::vector<NR::Point> &points_to_snap,
+                                                               ConstraintLine const &c,
+                                                    std::list<SPItem const *> const &it) const
 {
     Inkscape::SnappedPoint s = SnappedPoint(p, NR_HUGE);