summaryrefslogtreecommitdiffstats
path: root/src/context-fns.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-08-11 04:53:15 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-08-11 04:53:15 +0000
commitb1597d6f47f64eef7d17b7b614056edd64692130 (patch)
treeb0f4bbc9d67f2afe50125afe915ec1062c0d6b98 /src/context-fns.cpp
parentpatch from bug 169004 (diff)
downloadinkscape-b1597d6f47f64eef7d17b7b614056edd64692130.tar.gz
inkscape-b1597d6f47f64eef7d17b7b614056edd64692130.zip
Move all of the snapper code to 2geom
(bzr r6606)
Diffstat (limited to 'src/context-fns.cpp')
-rw-r--r--src/context-fns.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 28725c64f..e58476147 100644
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
@@ -132,11 +132,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::SNAPPOINT_NODE, p[0],
+ s[0] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(p[0]),
Inkscape::Snapper::ConstraintLine(p[0] - p[1]));
/* Try to snap p[1] (the dragged corner) along the constraint vector */
- s[1] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1],
+ s[1] = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(p[1]),
Inkscape::Snapper::ConstraintLine(p[1] - p[0]));
/* Choose the best snap and update points accordingly */
@@ -157,7 +157,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;
- snappoint = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1],
+ snappoint = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(p[1]),
Inkscape::Snapper::ConstraintLine(p[1] - p[0]));
if (snappoint.getSnapped()) {
p[1] = snappoint.getPoint();
@@ -175,8 +175,8 @@ NR::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item,
Inkscape::SnappedPoint s[2];
- s[0] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[0]);
- s[1] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p[1]);
+ s[0] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(p[0]));
+ s[1] = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(p[1]));
if (s[0].getDistance() < s[1].getDistance()) {
if (s[0].getSnapped()) {
@@ -197,7 +197,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] = pt;
- snappoint = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, pt);
+ snappoint = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, to_2geom(pt));
if (snappoint.getSnapped()) {
p[1] = snappoint.getPoint();
}