diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-01 17:39:57 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-01 17:39:57 +0000 |
| commit | 2df2ad74531a0aa0f221db556f26dd6505e1a61f (patch) | |
| tree | c0f9dd711aef5d79aa33bca8b4352def6166f0be /src/live_effects/lpe-perspective_path.cpp | |
| parent | Formerly static function used for snapping is now a private member of KnotHol... (diff) | |
| download | inkscape-2df2ad74531a0aa0f221db556f26dd6505e1a61f.tar.gz inkscape-2df2ad74531a0aa0f221db556f26dd6505e1a61f.zip | |
Make LPE knotholder handles snap
(bzr r6506)
Diffstat (limited to 'src/live_effects/lpe-perspective_path.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective_path.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index e3397a20e..998554241 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -168,8 +168,10 @@ KnotHolderEntityOffset::knot_set(NR::Point const &p, NR::Point const &origin, gu LPEPerspectivePath* lpe = get_effect(item); - lpe->offsetx.param_set_value((p - origin)[NR::X]); - lpe->offsety.param_set_value(-(p - origin)[NR::Y]); // additional minus sign is due to coordinate system flipping + NR::Point const s = snap_knot_position(p); + + lpe->offsetx.param_set_value((s - origin)[NR::X]); + lpe->offsety.param_set_value(-(s - origin)[NR::Y]); // additional minus sign is due to coordinate system flipping // FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating. sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true); |
