summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-07-12 05:51:13 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-07-12 05:51:13 +0000
commit35300c9822f9f84c8a011913235fd4e5dc2c5ac8 (patch)
tree87c2a9ead85042f584c7b6411adfb7118496333d /src/ui/tool/node.cpp
parentStop setting of stops from getting url() reference colors. (diff)
downloadinkscape-35300c9822f9f84c8a011913235fd4e5dc2c5ac8.tar.gz
inkscape-35300c9822f9f84c8a011913235fd4e5dc2c5ac8.zip
- Snap while rotating an object using the selector tool
- Rename the ConstraintLine class to SnapConstraint - Move some duplicated code to 2geom (bzr r9607)
Diffstat (limited to 'src/ui/tool/node.cpp')
-rw-r--r--src/ui/tool/node.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 9c9c58ff1..886ddd1be 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -266,7 +266,7 @@ void Handle::dragged(Geom::Point &new_pos, GdkEventMotion *event)
Node *node_away = (this == &_parent->_front ? _parent->_prev() : _parent->_next());
if (_parent->type() == NODE_SMOOTH && Node::_is_line_segment(_parent, node_away)) {
- Inkscape::Snapper::ConstraintLine cl(_parent->position(),
+ Inkscape::Snapper::SnapConstraint cl(_parent->position(),
_parent->position() - node_away->position());
Inkscape::SnappedPoint p;
p = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, SNAPSOURCE_NODE_HANDLE), cl);
@@ -974,7 +974,7 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
// with Ctrl+Alt, constrain to handle lines
// project the new position onto a handle line that is closer
boost::optional<Geom::Point> front_point, back_point;
- boost::optional<Inkscape::Snapper::ConstraintLine> line_front, line_back;
+ boost::optional<Inkscape::Snapper::SnapConstraint> line_front, line_back;
if (_front.isDegenerate()) {
if (_is_line_segment(this, _next()))
front_point = _next()->position() - origin;
@@ -988,9 +988,9 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
back_point = _back.relativePos();
}
if (front_point)
- line_front = Inkscape::Snapper::ConstraintLine(origin, *front_point);
+ line_front = Inkscape::Snapper::SnapConstraint(origin, *front_point);
if (back_point)
- line_back = Inkscape::Snapper::ConstraintLine(origin, *back_point);
+ line_back = Inkscape::Snapper::SnapConstraint(origin, *back_point);
// TODO: combine the snap and non-snap branches by modifying snap.h / snap.cpp
if (snap) {
@@ -1029,8 +1029,8 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
// with Ctrl, constrain to axes
// TODO combine the two branches
if (snap) {
- Inkscape::Snapper::ConstraintLine line_x(origin, Geom::Point(1, 0));
- Inkscape::Snapper::ConstraintLine line_y(origin, Geom::Point(0, 1));
+ Inkscape::Snapper::SnapConstraint line_x(origin, Geom::Point(1, 0));
+ Inkscape::Snapper::SnapConstraint line_y(origin, Geom::Point(0, 1));
fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_x);
bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_y);
}