From fc192305a5194959167fce74e6ff0ff9f11447cf Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 5 Sep 2007 20:16:30 +0000 Subject: Improving the performance of the object snapper (bzr r3689) --- src/line-snapper.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/line-snapper.cpp') diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp index 4c886fea5..cf46671c8 100644 --- a/src/line-snapper.cpp +++ b/src/line-snapper.cpp @@ -10,12 +10,14 @@ Inkscape::LineSnapper::LineSnapper(SPNamedView const *nv, NR::Coord const d) : S Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(Inkscape::Snapper::PointType const &t, NR::Point const &p, + bool const &f, + std::vector &points_to_snap, std::list const &it) const { /* Snap along x (ie to vertical lines) */ - Inkscape::SnappedPoint const v = _doConstrainedSnap(t, 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(t, 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. @@ -37,7 +39,9 @@ Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(Inkscape::Snapper::Poi Inkscape::SnappedPoint Inkscape::LineSnapper::_doConstrainedSnap(Inkscape::Snapper::PointType const &t, NR::Point const &p, - ConstraintLine const &c, + bool const &f, + std::vector &points_to_snap, + ConstraintLine const &c, std::list const &it) const { Inkscape::SnappedPoint s = SnappedPoint(p, NR_HUGE); -- cgit v1.2.3