From 1241b0a2a63239470a6d06203aa0e5aae4678cf9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 5 May 2006 16:44:29 +0000 Subject: More snapping cleanups. (bzr r741) --- src/snap.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/snap.h') diff --git a/src/snap.h b/src/snap.h index d7050d822..ad5c68857 100644 --- a/src/snap.h +++ b/src/snap.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "grid-snapper.h" #include "guide-snapper.h" #include "object-snapper.h" @@ -75,6 +76,14 @@ public: NR::scale const &s, NR::Point const &o) const; + std::pair freeSnapStretch(Inkscape::Snapper::PointType t, + std::vector const &p, + std::list const &it, + NR::Coord const &s, + NR::Point const &o, + NR::Dim2 d, + bool uniform) const; + Inkscape::GridSnapper grid; Inkscape::GuideSnapper guide; Inkscape::ObjectSnapper object; @@ -84,12 +93,12 @@ public: private: - enum Transformation - { + enum Transformation { TRANSLATION, - SCALE + SCALE, + STRETCH }; - + std::pair _snapTransformed(Inkscape::Snapper::PointType type, std::vector const &points, std::list const &ignore, @@ -97,7 +106,9 @@ private: Inkscape::Snapper::ConstraintLine const &constraint, Transformation transformation_type, NR::Point const &transformation, - NR::Point const &origin) const; + NR::Point const &origin, + NR::Dim2 dim, + bool uniform) const; }; @@ -113,13 +124,6 @@ NR::Coord namedview_dim_snap(SPNamedView const *nv, Inkscape::Snapper::PointType /* List of points methods */ -std::pair namedview_vector_snap_list(SPNamedView const *nv, - Inkscape::Snapper::PointType t, const std::vector &p, - NR::Point const &norm, NR::scale const &s, - std::list const &it - ); - - NR::Coord namedview_dim_snap_list_skew(SPNamedView const *nv, Inkscape::Snapper::PointType t, const std::vector &p, NR::Point const &norm, double const sx, NR::Dim2 const dim); -- cgit v1.2.3