X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fline-snapper.h;h=529db1caaeb833700e6b0cb8da7ac2c916794753;hb=429ce09996dfe0ef44a115a89465c69eb4d376a6;hp=6a1ff9016b105d140cb9d62af7213bc5d29fcb27;hpb=1dcc408c2579584fcea4bd1602f7c8d41c27dfb8;p=inkscape.git diff --git a/src/line-snapper.h b/src/line-snapper.h index 6a1ff9016..529db1caa 100644 --- a/src/line-snapper.h +++ b/src/line-snapper.h @@ -7,6 +7,9 @@ * * Authors: * Carl Hetherington + * Diederik van Lierop + * + * Copyright (C) 1999-2008 Authors * * Released under GNU GPL, read the file 'COPYING' for more information. */ @@ -19,36 +22,37 @@ namespace Inkscape class LineSnapper : public Snapper { public: - LineSnapper(SPNamedView const *nv, NR::Coord const d); + LineSnapper(SnapManager const *sm, Geom::Coord const d); + + void freeSnap(SnappedConstraints &sc, + Inkscape::SnapPreferences::PointType const &t, + Geom::Point const &p, + bool const &first_point, + Geom::OptRect const &bbox_to_snap, + std::vector const *it, + std::vector *unselected_nodes) const; + + void constrainedSnap(SnappedConstraints &sc, + Inkscape::SnapPreferences::PointType const &t, + Geom::Point const &p, + bool const &first_point, + Geom::OptRect const &bbox_to_snap, + ConstraintLine const &c, + std::vector const *it) const; 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: - 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; - - 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 LineList _getSnapLines(Geom::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; + virtual void _addSnappedLine(SnappedConstraints &sc, Geom::Point const snapped_point, Geom::Coord const snapped_distance, Geom::Point const normal_to_line, Geom::Point const point_on_line) const = 0; }; }