diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-05-04 16:27:08 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-05-04 16:27:08 +0000 |
| commit | 8dffa3e5ef1f8c53211bfa9e45aa5c2bcd589b3f (patch) | |
| tree | 09e3531c7e1db43a75fc912bb95aa5ed35fa87fc /src/object-snapper.cpp | |
| parent | Remove warnings (diff) | |
| download | inkscape-8dffa3e5ef1f8c53211bfa9e45aa5c2bcd589b3f.tar.gz inkscape-8dffa3e5ef1f8c53211bfa9e45aa5c2bcd589b3f.zip | |
Next steps in implementing the snapping indicator
(bzr r5600)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 57ec1b347..915b9eb0b 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -193,7 +193,7 @@ void Inkscape::ObjectSnapper::_snapNodes(SnappedConstraints &sc, for (std::vector<NR::Point>::const_iterator k = _points_to_snap_to->begin(); k != _points_to_snap_to->end(); k++) { NR::Coord dist = NR::L2(*k - p); if (dist < getSnapperTolerance() && dist < s.getDistance()) { - s = SnappedPoint(*k, dist, getSnapperTolerance(), getSnapperAlwaysSnap()); + s = SnappedPoint(*k, SNAPTARGET_NODE, dist, getSnapperTolerance(), getSnapperAlwaysSnap()); success = true; } } @@ -222,7 +222,7 @@ void Inkscape::ObjectSnapper::_snapTranslatingGuideToNodes(SnappedConstraints &s NR::Coord dist = NR::L2(*k - p_proj); // distance from node to the guide NR::Coord dist2 = NR::L2(p - p_proj); // distance from projection of node on the guide, to the mouse location if ((dist < tol && dist2 < tol || getSnapperAlwaysSnap()) && dist < s.getDistance()) { - s = SnappedPoint(*k, dist, tol, getSnapperAlwaysSnap()); + s = SnappedPoint(*k, SNAPTARGET_NODE, dist, tol, getSnapperAlwaysSnap()); success = true; } } @@ -435,7 +435,7 @@ void Inkscape::ObjectSnapper::_snapPaths(SnappedConstraints &sc, } else { // for segments other than straight lines of a path, we'll return just the closest snapped point if (dist < s.getDistance()) { - s = SnappedPoint(o_dt, dist, getSnapperTolerance(), getSnapperAlwaysSnap()); + s = SnappedPoint(o_dt, SNAPTARGET_PATH, dist, getSnapperTolerance(), getSnapperAlwaysSnap()); success = true; } } @@ -529,7 +529,7 @@ void Inkscape::ObjectSnapper::_snapPathsConstrained(SnappedConstraints &sc, // (within snapping range == between p_min_on_cl and p_max_on_cl == 0 < tb < 1) if ((*m).tb >= 0 && (*m).tb <= 1 ) { NR::Coord dist = NR::L2(desktop->dt2doc(p_proj_on_cl) - p_inters); - SnappedPoint s(desktop->doc2dt(p_inters), dist, getSnapperTolerance(), getSnapperAlwaysSnap()); + SnappedPoint s(desktop->doc2dt(p_inters), SNAPTARGET_PATH, dist, getSnapperTolerance(), getSnapperAlwaysSnap()); sc.points.push_back(s); } } |
