From 179fa413b047bede6e32109e2ce82437c5fb8d34 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 16 Jan 2006 02:36:01 +0000 Subject: moving trunk for module inkscape (bzr r1) --- src/line-snapper.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/line-snapper.h (limited to 'src/line-snapper.h') diff --git a/src/line-snapper.h b/src/line-snapper.h new file mode 100644 index 000000000..581466d33 --- /dev/null +++ b/src/line-snapper.h @@ -0,0 +1,44 @@ +#ifndef SEEN_LINE_SNAPPER_H +#define SEEN_LINE_SNAPPER_H + +/** + * \file src/line-snapper.h + * \brief Superclass for snappers to horizontal and vertical lines. + * + * Authors: + * Carl Hetherington + * + * Released under GNU GPL, read the file 'COPYING' for more information. + */ + +#include "snapper.h" + +namespace Inkscape +{ + +class LineSnapper : public Snapper +{ +public: + LineSnapper(SPNamedView const *nv, NR::Coord const d); + +protected: + typedef std::list > LineList; + +private: + SnappedPoint _doFreeSnap(NR::Point const &p, + std::list const &it) const; + + SnappedPoint _doConstrainedSnap(NR::Point const &p, + NR::Point 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; +}; + +} + +#endif /* !SEEN_LINE_SNAPPER_H */ -- cgit v1.2.3