From 55788b44d28d38dfd0165a87c8d61c265eab4557 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 1 Aug 2008 17:45:13 +0000 Subject: change knot.h to Geom::Point only instead of NR::Point. (bzr r6511) --- src/nodepath.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/nodepath.cpp') diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 337731e57..ec9920815 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1705,11 +1705,11 @@ static void sp_node_update_handle(Inkscape::NodePath::Node *node, gint which, gb sp_ctrlline_set_coords(SP_CTRLLINE(side->line), node->pos, side->pos); sp_knot_show(side->knot); } else { - if (side->knot->pos != side->pos) { // only if it's really moved + if (side->knot->pos != to_2geom(side->pos)) { // only if it's really moved if (fire_move_signals) { - sp_knot_set_position(side->knot, &side->pos, 0); // this will set coords of the line as well + sp_knot_set_position(side->knot, side->pos, 0); // this will set coords of the line as well } else { - sp_knot_moveto(side->knot, &side->pos); + sp_knot_moveto(side->knot, side->pos); sp_ctrlline_set_coords(SP_CTRLLINE(side->line), node->pos, side->pos); } } @@ -1744,11 +1744,11 @@ static void sp_node_update_handles(Inkscape::NodePath::Node *node, bool fire_mov sp_knot_show(node->knot); } - if (node->knot->pos != node->pos) { // visible knot is in a different position, need to update + if (node->knot->pos != to_2geom(node->pos)) { // visible knot is in a different position, need to update if (fire_move_signals) - sp_knot_set_position(node->knot, &node->pos, 0); + sp_knot_set_position(node->knot, node->pos, 0); else - sp_knot_moveto(node->knot, &node->pos); + sp_knot_moveto(node->knot, node->pos); } gboolean show_handles = node->selected; @@ -3757,10 +3757,10 @@ static void node_handle_ungrabbed(SPKnot *knot, guint state, gpointer data) // forget origin and set knot position once more (because it can be wrong now due to restrictions) if (n->p.knot == knot) { n->p.origin_radial.a = 0; - sp_knot_set_position(knot, &n->p.pos, state); + sp_knot_set_position(knot, n->p.pos, state); } else if (n->n.knot == knot) { n->n.origin_radial.a = 0; - sp_knot_set_position(knot, &n->n.pos, state); + sp_knot_set_position(knot, n->n.pos, state); } else { g_assert_not_reached(); } @@ -3916,7 +3916,7 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer other->pos = NR::Point(rother) + n->pos; if (other->knot) { sp_ctrlline_set_coords(SP_CTRLLINE(other->line), n->pos, other->pos); - sp_knot_moveto(other->knot, &other->pos); + sp_knot_moveto(other->knot, other->pos); } } @@ -3925,7 +3925,7 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer // move knot, but without emitting the signal: // we cannot emit a "moved" signal because we're now processing it - sp_knot_moveto(me->knot, &(me->pos)); + sp_knot_moveto(me->knot, me->pos); update_object(n->subpath->nodepath); @@ -4485,7 +4485,7 @@ sp_nodepath_node_new(Inkscape::NodePath::SubPath *sp, Inkscape::NodePath::Node * n->n.other = next; n->knot = sp_knot_new(sp->nodepath->desktop, _("Node: drag to edit the path; with Ctrl to snap to horizontal/vertical; with Ctrl+Alt to snap to handles' directions")); - sp_knot_set_position(n->knot, pos, 0); + sp_knot_set_position(n->knot, *pos, 0); n->knot->setShape ((n->type == Inkscape::NodePath::NODE_CUSP)? SP_KNOT_SHAPE_DIAMOND : SP_KNOT_SHAPE_SQUARE); n->knot->setSize ((n->type == Inkscape::NodePath::NODE_CUSP)? 9 : 7); -- cgit v1.2.3