summaryrefslogtreecommitdiffstats
path: root/src/object-snapper.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-03-15 21:08:02 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-03-15 21:08:02 +0000
commite6a7b16084f21efb8268abfa6e8773b089cf740f (patch)
tree5938368bcddd877797cdc5cefa370df3f704d1e6 /src/object-snapper.cpp
parentstore default size in lpe::ArrayParam (diff)
downloadinkscape-e6a7b16084f21efb8268abfa6e8773b089cf740f.tar.gz
inkscape-e6a7b16084f21efb8268abfa6e8773b089cf740f.zip
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)
Diffstat (limited to 'src/object-snapper.cpp')
-rw-r--r--src/object-snapper.cpp5
1 files changed, 1 insertions, 4 deletions
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);