From e182d3546498c8c865fb155481890c5571430c6f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 14 Feb 2012 21:56:34 +0100 Subject: 1) Add checkboxes for perpendicular and tangential snapping to the document properties dialog (on the snap tab) 2) Newly created guides (dragged off the ruler) will take on the angle of the curve that's being snapped to (either perpendicularly or tangentialy, depending of the settings in the document properties dialog) (bzr r10975) --- src/snapped-point.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/snapped-point.cpp') diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp index 72875995d..d155babd7 100644 --- a/src/snapped-point.cpp +++ b/src/snapped-point.cpp @@ -25,6 +25,7 @@ Inkscape::SnappedPoint::SnappedPoint(Geom::Point const &p, SnapSourceType const _second_tolerance = 1; _second_always_snap = false; _transformation = Geom::Point(1,1); + _tangent = Geom::Point(0,0); _pointer_distance = Geom::infinity(); } @@ -41,6 +42,7 @@ Inkscape::SnappedPoint::SnappedPoint(Inkscape::SnapCandidatePoint const &p, Snap _second_tolerance = 1; _second_always_snap = false; _transformation = Geom::Point(1,1); + _tangent = Geom::Point(0,0); _pointer_distance = Geom::infinity(); _target_bbox = p.getTargetBBox(); @@ -53,6 +55,7 @@ Inkscape::SnappedPoint::SnappedPoint(Geom::Point const &p, SnapSourceType const // tolerance should never be smaller than 1 px, as it is used for normalization in // isOtherSnapBetter. We don't want a division by zero. _transformation = Geom::Point(1,1); + _tangent = Geom::Point(0,0); _pointer_distance = Geom::infinity(); _target_bbox = Geom::OptRect(); } @@ -73,6 +76,7 @@ Inkscape::SnappedPoint::SnappedPoint() _second_tolerance = 1; _second_always_snap = false; _transformation = Geom::Point(1,1); + _tangent = Geom::Point(0,0); _pointer_distance = Geom::infinity(); _target_bbox = Geom::OptRect(); } @@ -93,6 +97,7 @@ Inkscape::SnappedPoint::SnappedPoint(Geom::Point const &p) _second_tolerance = 1; _second_always_snap = false; _transformation = Geom::Point(1,1); + _tangent = Geom::Point(0,0); _pointer_distance = Geom::infinity(); _target_bbox = Geom::OptRect(); } -- cgit v1.2.3