diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-05-11 19:22:30 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-05-11 19:22:30 +0000 |
| commit | 02fa22f04f7a81655183192baf55e74aebf53df7 (patch) | |
| tree | 8ad2d4d2fb0118631abac40d3e8232a1b50dfe6c /src/shape-editor.cpp | |
| parent | Fixing compile warnings (diff) | |
| download | inkscape-02fa22f04f7a81655183192baf55e74aebf53df7.tar.gz inkscape-02fa22f04f7a81655183192baf55e74aebf53df7.zip | |
fixed fixme's in shapeeditor and changed verbs for node editting. helps with multiple nodepath implementation in shape-editor.
(bzr r3000)
Diffstat (limited to 'src/shape-editor.cpp')
| -rw-r--r-- | src/shape-editor.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 1a0f319da..f865d6a4d 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -343,11 +343,11 @@ void ShapeEditor::deselect() { } void ShapeEditor::add_node () { - sp_node_selected_add_node(); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_add_node(this->nodepath); } void ShapeEditor::delete_nodes () { - sp_node_selected_delete(); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_delete(this->nodepath); } void ShapeEditor::delete_nodes_preserving_shape () { @@ -356,31 +356,39 @@ void ShapeEditor::delete_nodes_preserving_shape () { } } +void ShapeEditor::delete_segment () { + sp_node_selected_delete_segment(this->nodepath); +} + void ShapeEditor::set_node_type(int type) { - sp_node_selected_set_type((Inkscape::NodePath::NodeType) type); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_set_type(this->nodepath, (Inkscape::NodePath::NodeType) type); } void ShapeEditor::break_at_nodes() { - sp_node_selected_break(); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_break(this->nodepath); } void ShapeEditor::join_nodes() { - sp_node_selected_join(); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_join(this->nodepath); +} + +void ShapeEditor::join_segments() { + sp_node_selected_join_segment(this->nodepath); } void ShapeEditor::duplicate_nodes() { - sp_node_selected_duplicate(); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_duplicate(this->nodepath); } void ShapeEditor::set_type_of_segments(NRPathcode code) { - sp_node_selected_set_line_type(code); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_set_line_type(this->nodepath, code); } void ShapeEditor::move_nodes_screen(gdouble dx, gdouble dy) { - sp_node_selected_move_screen(dx, dy); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_move_screen(this->nodepath, dx, dy); } void ShapeEditor::move_nodes(gdouble dx, gdouble dy) { - sp_node_selected_move(dx, dy); // FIXME fix that function by removing nodepath_current lookup, and pass it this->nodepath instead (needs fixing verbs/buttons first) + sp_node_selected_move(this->nodepath, dx, dy); } void ShapeEditor::rotate_nodes(gdouble angle, int which, bool screen) { @@ -412,6 +420,12 @@ void ShapeEditor::select_prev () { sp_nodepath_select_prev (this->nodepath); } +void ShapeEditor::show_handles (bool show) { + if (this->nodepath) + sp_nodepath_show_handles (this->nodepath, show); +} + + void ShapeEditor::flip (NR::Dim2 axis, NR::Maybe<NR::Point> center) { if (this->nodepath) sp_nodepath_flip (this->nodepath, axis, center); |
