diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-03-15 21:08:02 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-03-15 21:08:02 +0000 |
| commit | e6a7b16084f21efb8268abfa6e8773b089cf740f (patch) | |
| tree | 5938368bcddd877797cdc5cefa370df3f704d1e6 /src/knot-holder-entity.cpp | |
| parent | store default size in lpe::ArrayParam (diff) | |
| download | inkscape-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/knot-holder-entity.cpp')
| -rw-r--r-- | src/knot-holder-entity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index 4225dd9e3..6e4ecae83 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -98,14 +98,14 @@ KnotHolderEntity::snap_knot_position(Geom::Point const &p) } Geom::Point -KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::ConstraintLine const &constraint) +KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::ConstraintLine const &constraint, bool const snap_projection) { Geom::Matrix const i2d (sp_item_i2d_affine(item)); Geom::Point s = p * i2d; Inkscape::Snapper::ConstraintLine transformed_constraint = Inkscape::Snapper::ConstraintLine(constraint.getPoint() * i2d, (constraint.getPoint() + constraint.getDirection()) * i2d - constraint.getPoint() * i2d); SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop, true, item); - m.constrainedSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, s, Inkscape::SNAPSOURCE_HANDLE, transformed_constraint); + m.constrainedSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, s, Inkscape::SNAPSOURCE_HANDLE, transformed_constraint, snap_projection); return s * i2d.inverse(); } |
