summaryrefslogtreecommitdiffstats
path: root/src/snap.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-27 16:05:32 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-27 16:05:32 +0000
commitd6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a (patch)
tree69ea9c65f725d83ae1bc267ea5a0358a1bc1d793 /src/snap.cpp
parentRemove all NRRect use. (diff)
downloadinkscape-d6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a.tar.gz
inkscape-d6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a.zip
Completely remove NRRect, NRRectL, in-svg-plane.h
(bzr r10582.1.6)
Diffstat (limited to 'src/snap.cpp')
-rw-r--r--src/snap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index 7647341fe..1756e7dd2 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -734,7 +734,8 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed(
Geom::Coord r = Geom::L2(b); // the radius of the circular constraint
dedicated_constraint = Inkscape::Snapper::SnapConstraint(origin, b, r);
} else if (transformation_type == STRETCH) { // when non-uniform stretching {
- dedicated_constraint = Inkscape::Snapper::SnapConstraint((*i).getPoint(), component_vectors[dim]);
+ Geom::Point cvec; cvec[dim] = 1.;
+ dedicated_constraint = Inkscape::Snapper::SnapConstraint((*i).getPoint(), cvec);
} else if (transformation_type == TRANSLATE) {
// When doing a constrained translation, all points will move in the same direction, i.e.
// either horizontally or vertically. The lines along which they move are therefore all
@@ -751,7 +752,8 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed(
// When scaling, a point aligned either horizontally or vertically with the origin can only
// move in that specific direction; therefore it should only snap in that direction, otherwise
// we will get snapped points with an invalid transformation
- dedicated_constraint = Inkscape::Snapper::SnapConstraint(origin, component_vectors[c1]);
+ Geom::Point cvec; cvec[c1] = 1.;
+ dedicated_constraint = Inkscape::Snapper::SnapConstraint(origin, cvec);
snapped_point = constrainedSnap(*j, dedicated_constraint, bbox);
} else {
// If we have a collection of SnapCandidatePoints, with mixed constrained snapping and free snapping