summaryrefslogtreecommitdiffstats
path: root/src/context-fns.cpp
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2006-05-05 14:22:41 +0000
committercth103 <cth103@users.sourceforge.net>2006-05-05 14:22:41 +0000
commitb0bda995cebf5befd80a735796661fb670eca179 (patch)
tree374d96842b1befddde6bb2dc503b1700535982b2 /src/context-fns.cpp
parentremove overdefinition (diff)
downloadinkscape-b0bda995cebf5befd80a735796661fb670eca179.tar.gz
inkscape-b0bda995cebf5befd80a735796661fb670eca179.zip
Various snapping cleanups and bug fixes.
(bzr r734)
Diffstat (limited to 'src/context-fns.cpp')
-rw-r--r--src/context-fns.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 5db98ec16..f11b2fcfa 100644
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
@@ -108,12 +108,12 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item,
Inkscape::SnappedPoint s[2];
/* Try to snap p[0] (the opposite corner) along the constraint vector */
- s[0] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT,
- p[0], p[0] - p[1], item);
+ s[0] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[0],
+ Inkscape::Snapper::ConstraintLine(p[0] - p[1]), item);
/* Try to snap p[1] (the dragged corner) along the constraint vector */
- s[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT,
- p[1], p[1] - p[0], item);
+ s[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[1],
+ Inkscape::Snapper::ConstraintLine(p[1] - p[0]), item);
/* Choose the best snap and update points accordingly */
if (s[0].getDistance() < s[1].getDistance()) {
@@ -128,7 +128,8 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item,
/* Our origin is the opposite corner. Snap the drag point along the constraint vector */
p[0] = center;
- p[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[1], p[1] - p[0], item).getPoint();
+ p[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[1],
+ Inkscape::Snapper::ConstraintLine(p[1] - p[0]), item).getPoint();
}
} else if (shift) {