summaryrefslogtreecommitdiffstats
path: root/src/snap.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-28 22:53:56 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-28 22:53:56 +0000
commitf4b79d4a8edc870f099fb9194c8493ec04012ad1 (patch)
tree2951d5171168abc288c00d09d04f5e5737e779d5 /src/snap.cpp
parentTie the snapping of rectangle corners and quadrant points of ellipses to the ... (diff)
parentCompletely remove libnr (diff)
downloadinkscape-f4b79d4a8edc870f099fb9194c8493ec04012ad1.tar.gz
inkscape-f4b79d4a8edc870f099fb9194c8493ec04012ad1.zip
Completely remove libnr
(bzr r10589)
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 5779e59b0..9020b82a3 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