X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsnapper.cpp;h=4dfb9042e6f74c710e78f7454bc3c2003fcfb37e;hb=80d34fe4a953d704430b44c6201a4fcbf455dfc6;hp=f8f7705f23d5e3963e72f6a2e51426d0255ad4a9;hpb=5c681d52040046fc1284c71112618c2b09e36e86;p=inkscape.git diff --git a/src/snapper.cpp b/src/snapper.cpp index f8f7705f2..4dfb9042e 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -85,115 +85,6 @@ void Inkscape::Snapper::setEnabled(bool s) _snap_enabled = s; } - -/** - * Try to snap a point to whatever this snapper is interested in. Any - * snap that occurs will be to the nearest "interesting" thing (e.g. a - * grid or guide line) - * - * \param t Point type. - * \param p Point to snap (desktop coordinates). - * \param it Item that should not be snapped to. - * \return Snapped point. - */ - -void Inkscape::Snapper::freeSnap(SnappedConstraints &sc, - PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - SPItem const *it) const -{ - std::list lit; - if (it) { - lit.push_back(it); - } - - freeSnap(sc, t, p, first_point, points_to_snap, lit, NULL); -} - -/** - * Try to snap a point to whatever this snapper is interested in. Any - * snap that occurs will be to the nearest "interesting" thing (e.g. a - * grid or guide line) - * - * \param t Point type. - * \param p Point to snap (desktop coordinates). - * \param it Items that should not be snapped to. - * \return Snapped point. - */ - -void Inkscape::Snapper::freeSnap(SnappedConstraints &sc, - - PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - std::list const &it, - std::vector *unselected_nodes) const -{ - if (_snap_enabled == false || getSnapFrom(t) == false) { - return; - } - - _doFreeSnap(sc, t, p, first_point, points_to_snap, it, unselected_nodes); -} - - - - -/** - * Try to snap a point to whatever this snapper is interested in, where - * the snap point is constrained to lie along a specified vector from the - * original point. - * - * \param p Point to snap (desktop coordinates). - * \param c Vector to constrain the snap to. - * \param it Items that should not be snapped to. - * \return Snapped point. - */ - -void Inkscape::Snapper::constrainedSnap(SnappedConstraints &sc, - - PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - ConstraintLine const &c, - SPItem const *it) const -{ - std::list lit; - lit.push_back(it); - constrainedSnap(sc, t, p, first_point, points_to_snap, c, lit); -} - - -/** - * Try to snap a point to whatever this snapper is interested in, where - * the snap point is constrained to lie along a specified vector from the - * original point. - * - * \param p Point to snap (desktop coordinates). - * \param c Vector to constrain the snap to. - * \param it Items that should not be snapped to. - * \return Snapped point. - */ - -void Inkscape::Snapper::constrainedSnap(SnappedConstraints &sc, - PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - ConstraintLine const &c, - std::list const &it) const -{ - if (_snap_enabled == false || getSnapFrom(t) == false) { - return; - } - - _doConstrainedSnap(sc, t, p, first_point, points_to_snap, c, it); -} - /* Local Variables: mode:c++