diff options
| author | Carl Hetherington <cth@carlh.net> | 2006-05-05 16:44:29 +0000 |
|---|---|---|
| committer | cth103 <cth103@users.sourceforge.net> | 2006-05-05 16:44:29 +0000 |
| commit | 1241b0a2a63239470a6d06203aa0e5aae4678cf9 (patch) | |
| tree | 008cba351e63f30d68704cb2497046edaeebcc65 /src/snap.h | |
| parent | fix 1482463 (diff) | |
| download | inkscape-1241b0a2a63239470a6d06203aa0e5aae4678cf9.tar.gz inkscape-1241b0a2a63239470a6d06203aa0e5aae4678cf9.zip | |
More snapping cleanups.
(bzr r741)
Diffstat (limited to 'src/snap.h')
| -rw-r--r-- | src/snap.h | 28 |
1 files changed, 16 insertions, 12 deletions
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 <libnr/nr-coord.h> #include <libnr/nr-dim2.h> #include <libnr/nr-forward.h> +#include <libnr/nr-scale.h> #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<NR::Coord, bool> freeSnapStretch(Inkscape::Snapper::PointType t, + std::vector<NR::Point> const &p, + std::list<SPItem const *> 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<NR::Point, bool> _snapTransformed(Inkscape::Snapper::PointType type, std::vector<NR::Point> const &points, std::list<SPItem const *> 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<double, bool> namedview_vector_snap_list(SPNamedView const *nv, - Inkscape::Snapper::PointType t, const std::vector<NR::Point> &p, - NR::Point const &norm, NR::scale const &s, - std::list<SPItem const *> const &it - ); - - NR::Coord namedview_dim_snap_list_skew(SPNamedView const *nv, Inkscape::Snapper::PointType t, const std::vector<NR::Point> &p, NR::Point const &norm, double const sx, NR::Dim2 const dim); |
