diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-08-11 04:53:15 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-08-11 04:53:15 +0000 |
| commit | b1597d6f47f64eef7d17b7b614056edd64692130 (patch) | |
| tree | b0f4bbc9d67f2afe50125afe915ec1062c0d6b98 /src/draw-context.cpp | |
| parent | patch from bug 169004 (diff) | |
| download | inkscape-b1597d6f47f64eef7d17b7b614056edd64692130.tar.gz inkscape-b1597d6f47f64eef7d17b7b614056edd64692130.zip | |
Move all of the snapper code to 2geom
(bzr r6606)
Diffstat (limited to 'src/draw-context.cpp')
| -rw-r--r-- | src/draw-context.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp index b321f0f50..7bf01829d 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -481,7 +481,9 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, NR::Point &p, N /* Snap it along best vector */ SnapManager &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager; m.setup(SP_EVENT_CONTEXT_DESKTOP(ec), NULL); - m.constrainedSnapReturnByRef( Inkscape::Snapper::SNAPPOINT_NODE, p, Inkscape::Snapper::ConstraintLine(best)); + Geom::Point pt2g = to_2geom(p); + m.constrainedSnapReturnByRef( Inkscape::Snapper::SNAPPOINT_NODE, pt2g, Inkscape::Snapper::ConstraintLine(best)); + p = from_2geom(pt2g); } } } @@ -491,7 +493,9 @@ void spdc_endpoint_snap_free(SPEventContext const * const ec, NR::Point& p, guin { SnapManager &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager; m.setup(SP_EVENT_CONTEXT_DESKTOP(ec), NULL); - m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, p); + Geom::Point pt2g = to_2geom(p); + m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, pt2g); + p = from_2geom(pt2g); } static SPCurve * |
