diff --git a/src/line-snapper.h b/src/line-snapper.h
index 72afab76d0c4e3a3f091cbd4046b1c072621e2ec..6a1ff9016b105d140cb9d62af7213bc5d29fcb27 100644 (file)
--- a/src/line-snapper.h
+++ b/src/line-snapper.h
class LineSnapper : public Snapper
{
public:
- LineSnapper() {}
LineSnapper(SPNamedView const *nv, NR::Coord const d);
protected:
- typedef std::list<std::pair<NR::Dim2, NR::Coord> > LineList;
+ typedef std::list<std::pair<NR::Point, NR::Point> > LineList;
+ //first point is a vector normal to the line
+ //second point is a point on the line
private:
- virtual SnappedPoint _doFreeSnap(NR::Point const &p,
- std::list<SPItem const *> const &it) const;
+ void _doFreeSnap(SnappedConstraints &sc,
+ Inkscape::Snapper::PointType const &t,
+ NR::Point const &p,
+ bool const &first_point,
+ std::vector<NR::Point> &points_to_snap,
+ std::list<SPItem const *> const &it) const;
- SnappedPoint _doConstrainedSnap(NR::Point const &p,
- NR::Point const &c,
- std::list<SPItem const *> const &it) const;
+ void _doConstrainedSnap(SnappedConstraints &sc,
+ Inkscape::Snapper::PointType const &t,
+ NR::Point const &p,
+ bool const &first_point,
+ std::vector<NR::Point> &points_to_snap,
+ ConstraintLine const &c,
+ std::list<SPItem const *> 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;
};
}