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/context-fns.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/context-fns.cpp')
| -rw-r--r-- | src/context-fns.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/context-fns.cpp b/src/context-fns.cpp index 15138a10b..8a131b081 100644 --- a/src/context-fns.cpp +++ b/src/context-fns.cpp @@ -112,11 +112,11 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item, Inkscape::SnappedPoint s[2]; /* Try to snap p[0] (the opposite corner) along the constraint vector */ - s[0] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[0], + s[0] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[0], Inkscape::Snapper::ConstraintLine(p[0] - p[1]), item); /* Try to snap p[1] (the dragged corner) along the constraint vector */ - s[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[1], + s[1] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1], Inkscape::Snapper::ConstraintLine(p[1] - p[0]), item); /* Choose the best snap and update points accordingly */ @@ -132,7 +132,7 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item, /* Our origin is the opposite corner. Snap the drag point along the constraint vector */ p[0] = center; - p[1] = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT, p[1], + p[1] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1], Inkscape::Snapper::ConstraintLine(p[1] - p[0]), item).getPoint(); } @@ -147,8 +147,8 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item, Inkscape::SnappedPoint s[2]; - s[0] = m.freeSnap(Inkscape::Snapper::SNAP_POINT, p[0], item); - s[1] = m.freeSnap(Inkscape::Snapper::SNAP_POINT, p[1], item); + s[0] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[0], item); + s[1] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1], item); if (s[0].getDistance() < s[1].getDistance()) { p[0] = s[0].getPoint(); @@ -162,7 +162,7 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item, /* There's no constraint on the corner point, so just snap it to anything */ p[0] = center; - p[1] = m.freeSnap(Inkscape::Snapper::SNAP_POINT, pt, item).getPoint(); + p[1] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, pt, item).getPoint(); } p[0] = sp_desktop_dt2root_xy_point(desktop, p[0]); |
