From b1597d6f47f64eef7d17b7b614056edd64692130 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 11 Aug 2008 04:53:15 +0000 Subject: Move all of the snapper code to 2geom (bzr r6606) --- src/draw-context.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/draw-context.cpp') 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 * -- cgit v1.2.3