summaryrefslogtreecommitdiffstats
path: root/src/snapped-curve.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2012-02-14 20:56:34 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2012-02-14 20:56:34 +0000
commite182d3546498c8c865fb155481890c5571430c6f (patch)
tree3ea9d416ab9610220a3e11fbdae0f62c1ba91741 /src/snapped-curve.cpp
parentUpdate Authors & Translators lists in About dialog (diff)
downloadinkscape-e182d3546498c8c865fb155481890c5571430c6f.tar.gz
inkscape-e182d3546498c8c865fb155481890c5571430c6f.zip
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)
Diffstat (limited to 'src/snapped-curve.cpp')
-rw-r--r--src/snapped-curve.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/snapped-curve.cpp b/src/snapped-curve.cpp
index 8fdf1d46f..b332fa8c1 100644
--- a/src/snapped-curve.cpp
+++ b/src/snapped-curve.cpp
@@ -12,7 +12,7 @@
#include <2geom/crossing.h>
#include <2geom/path-intersection.h>
-Inkscape::SnappedCurve::SnappedCurve(Geom::Point const &snapped_point, int num_path, int num_segm, Geom::Coord const &snapped_distance, Geom::Coord const &snapped_tolerance, bool const &always_snap, bool const &fully_constrained, Geom::Curve const *curve, SnapSourceType source, long source_num, SnapTargetType target, Geom::OptRect target_bbox)
+Inkscape::SnappedCurve::SnappedCurve(Geom::Point const &snapped_point, Geom::Point const &tangent, int num_path, int num_segm, Geom::Coord const &snapped_distance, Geom::Coord const &snapped_tolerance, bool const &always_snap, bool const &fully_constrained, Geom::Curve const *curve, SnapSourceType source, long source_num, SnapTargetType target, Geom::OptRect target_bbox)
{
_num_path = num_path;
_num_segm = num_segm;
@@ -24,6 +24,7 @@ Inkscape::SnappedCurve::SnappedCurve(Geom::Point const &snapped_point, int num_p
_second_tolerance = 1;
_second_always_snap = false;
_point = snapped_point;
+ _tangent = tangent;
_at_intersection = false;
_fully_constrained = fully_constrained;
_source = source;
@@ -44,6 +45,7 @@ Inkscape::SnappedCurve::SnappedCurve()
_second_tolerance = 1;
_second_always_snap = false;
_point = Geom::Point(0,0);
+ _tangent = Geom::Point(0,0);
_at_intersection = false;
_fully_constrained = false;
_source = SNAPSOURCE_UNDEFINED;