summaryrefslogtreecommitdiffstats
path: root/src/line-snapper.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-09-05 20:16:30 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-09-05 20:16:30 +0000
commitfc192305a5194959167fce74e6ff0ff9f11447cf (patch)
tree98627181b625f5458c56c2a4bea9a06e82546fd9 /src/line-snapper.cpp
parentagain increase default pressure a bit (diff)
downloadinkscape-fc192305a5194959167fce74e6ff0ff9f11447cf.tar.gz
inkscape-fc192305a5194959167fce74e6ff0ff9f11447cf.zip
Improving the performance of the object snapper
(bzr r3689)
Diffstat (limited to 'src/line-snapper.cpp')
-rw-r--r--src/line-snapper.cpp10
1 files changed, 7 insertions, 3 deletions
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<NR::Point> &points_to_snap,
std::list<SPItem const *> 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<NR::Point> &points_to_snap,
+ ConstraintLine const &c,
std::list<SPItem const *> const &it) const
{
Inkscape::SnappedPoint s = SnappedPoint(p, NR_HUGE);