Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_node_selected_move_screen ( Inkscape::NodePath::Path nodepath,
gdouble  dx,
gdouble  dy 

Move node selection off screen and commit the change.

Definition at line 1354 of file nodepath.cpp.

References SPDesktop::current_zoom(), sp_nodepath_selected_nodes_move(), sp_nodepath_update_repr(), and sp_nodepath_update_repr_keyed().

    // borrowed from sp_selection_move_screen in selection-chemistry.c
    // we find out the current zoom factor and divide deltas by it
    SPDesktop *desktop = SP_ACTIVE_DESKTOP;

    gdouble zoom = desktop->current_zoom();
    gdouble zdx = dx / zoom;
    gdouble zdy = dy / zoom;

    if (!nodepath) return;

    sp_nodepath_selected_nodes_move(nodepath, zdx, zdy, false);

    if (dx == 0) {
        sp_nodepath_update_repr_keyed(nodepath, "node:move:vertical", _("Move nodes vertically"));
    } else if (dy == 0) {
        sp_nodepath_update_repr_keyed(nodepath, "node:move:horizontal", _("Move nodes horizontally"));
    } else {
        sp_nodepath_update_repr(nodepath, _("Move nodes"));

Generated by  Doxygen 1.6.0   Back to index