From e6a7b16084f21efb8268abfa6e8773b089cf740f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 15 Mar 2009 21:08:02 +0000 Subject: Implement constrained snapping when dragging the position and size handles of a rectangle in the node tool, with the ctrl-key being pressed. (bzr r7497) --- src/object-snapper.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index b02b9786a..e0506c8e2 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -548,13 +548,10 @@ void Inkscape::ObjectSnapper::_snapPathsConstrained(SnappedConstraints &sc, direction_vector = Geom::unit_vector(direction_vector); } - Geom::Point const p1_on_cl = c.hasPoint() ? c.getPoint() : p; - Geom::Point const p2_on_cl = p1_on_cl + direction_vector; - // The intersection point of the constraint line with any path, // must lie within two points on the constraintline: p_min_on_cl and p_max_on_cl // The distance between those points is twice the snapping tolerance - Geom::Point const p_proj_on_cl = Geom::projection(p, Geom::Line(p1_on_cl, p2_on_cl)); + Geom::Point const p_proj_on_cl = c.projection(p); Geom::Point const p_min_on_cl = _snapmanager->getDesktop()->dt2doc(p_proj_on_cl - getSnapperTolerance() * direction_vector); Geom::Point const p_max_on_cl = _snapmanager->getDesktop()->dt2doc(p_proj_on_cl + getSnapperTolerance() * direction_vector); -- cgit v1.2.3