diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-07-28 15:47:49 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-07-28 15:47:49 +0000 |
| commit | b79f13c5491131606a50a112a296e1011ddc91ee (patch) | |
| tree | 5959773e1d0206a0d6a4b240dd3f137507232861 /src/line-snapper.cpp | |
| parent | Set top-level groups as layers with the name of the PDF document (diff) | |
| download | inkscape-b79f13c5491131606a50a112a296e1011ddc91ee.tar.gz inkscape-b79f13c5491131606a50a112a296e1011ddc91ee.zip | |
1) Changes to snapping preferences dialog
2) Strict snapping implemented, i.e. bbox only to bbox and nodes only to paths/nodes
3) Renaming of some constants to improve readability
(bzr r3331)
Diffstat (limited to 'src/line-snapper.cpp')
| -rw-r--r-- | src/line-snapper.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp index a2c6b944b..4c886fea5 100644 --- a/src/line-snapper.cpp +++ b/src/line-snapper.cpp @@ -8,13 +8,14 @@ Inkscape::LineSnapper::LineSnapper(SPNamedView const *nv, NR::Coord const d) : S } -Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(NR::Point const &p, - std::list<SPItem const *> const &it) const +Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(Inkscape::Snapper::PointType const &t, + NR::Point const &p, + std::list<SPItem const *> const &it) const { /* Snap along x (ie to vertical lines) */ - Inkscape::SnappedPoint const v = _doConstrainedSnap(p, component_vectors[NR::X], it); + Inkscape::SnappedPoint const v = _doConstrainedSnap(t, p, component_vectors[NR::X], it); /* Snap along y (ie to horizontal lines) */ - Inkscape::SnappedPoint const h = _doConstrainedSnap(p, component_vectors[NR::Y], it); + Inkscape::SnappedPoint const h = _doConstrainedSnap(t, p, component_vectors[NR::Y], it); /* If we snapped to both, combine the two results. This is so that, for example, ** we snap nicely to the intersection of two guidelines. @@ -34,9 +35,10 @@ Inkscape::SnappedPoint Inkscape::LineSnapper::_doFreeSnap(NR::Point const &p, return h; } -Inkscape::SnappedPoint Inkscape::LineSnapper::_doConstrainedSnap(NR::Point const &p, - ConstraintLine const &c, - std::list<SPItem const *> const &it) const +Inkscape::SnappedPoint Inkscape::LineSnapper::_doConstrainedSnap(Inkscape::Snapper::PointType const &t, + NR::Point const &p, + ConstraintLine const &c, + std::list<SPItem const *> const &it) const { Inkscape::SnappedPoint s = SnappedPoint(p, NR_HUGE); |
