X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fline-snapper.h;h=6a1ff9016b105d140cb9d62af7213bc5d29fcb27;hb=f2c65c84b2e5016ef16907bf15d51ded9c25411e;hp=5d93c858e59a19f6c16357f908c58f7b65913283;hpb=1397a686e882c774cfef2668f397b2c2c495df66;p=inkscape.git diff --git a/src/line-snapper.h b/src/line-snapper.h index 5d93c858e..6a1ff9016 100644 --- a/src/line-snapper.h +++ b/src/line-snapper.h @@ -22,27 +22,33 @@ public: LineSnapper(SPNamedView const *nv, NR::Coord const d); protected: - typedef std::list > LineList; + typedef std::list > LineList; + //first point is a vector normal to the line + //second point is a point on the line private: - SnappedPoint _doFreeSnap(Inkscape::Snapper::PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - std::list const &it) const; + void _doFreeSnap(SnappedConstraints &sc, + Inkscape::Snapper::PointType const &t, + NR::Point const &p, + bool const &first_point, + std::vector &points_to_snap, + std::list const &it) const; - SnappedPoint _doConstrainedSnap(Inkscape::Snapper::PointType const &t, - NR::Point const &p, - bool const &first_point, - std::vector &points_to_snap, - ConstraintLine const &c, - std::list const &it) const; + void _doConstrainedSnap(SnappedConstraints &sc, + Inkscape::Snapper::PointType const &t, + NR::Point const &p, + bool const &first_point, + std::vector &points_to_snap, + ConstraintLine const &c, + std::list const &it) const; /** * \param p Point that we are trying to snap. * \return List of lines that we should try snapping to. */ virtual LineList _getSnapLines(NR::Point const &p) const = 0; + + virtual void _addSnappedLine(SnappedConstraints &sc, NR::Point const snapped_point, NR::Coord const snapped_distance, NR::Point const normal_to_line, NR::Point const point_on_line) const = 0; }; }