summaryrefslogtreecommitdiffstats
path: root/src/shape-editor.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-03-20 23:00:52 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-03-20 23:00:52 +0000
commit887dd72ac8da405acdbf4c34336c93577e4d17a3 (patch)
treedb35247fa2ecf953c2d8c19102b90234c76bde0e /src/shape-editor.cpp
parentChange from Level3 to Level2 Views (diff)
downloadinkscape-887dd72ac8da405acdbf4c34336c93577e4d17a3.tar.gz
inkscape-887dd72ac8da405acdbf4c34336c93577e4d17a3.zip
Add on-canvas editing of LPE PointParam.
* made special KnotHolder for Pointparameters. todo: * pointparam numerical widgets display SVG info, instead of desktop coordinates. must be fixed * knots cannot be selected and moved by keys (bzr r5133)
Diffstat (limited to 'src/shape-editor.cpp')
-rw-r--r--src/shape-editor.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index b1da900f4..dd8e1124e 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -22,6 +22,7 @@
#include "desktop.h"
#include "desktop-handles.h"
#include "knotholder.h"
+#include "live_effects/parameter/pointparam-knotholder.h"
#include "node-context.h"
#include "xml/node-event-vector.h"
#include "prefs-utils.h"
@@ -213,8 +214,8 @@ void ShapeEditor::set_item(SPItem *item) {
/** Please note that this function only works for path parameters.
* All other parameters probably will crash Inkscape!
*/
-void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, const char * key) {
-
+void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, const char * key)
+{
unset_item();
this->grab_node = -1;
@@ -236,11 +237,19 @@ void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject,
}
}
-/** Please note that this function only works for point parameters.
-* All other parameters probably will crash Inkscape!
+/**
+* pass a new knotholder to ShapeEditor to manage (and delete)
*/
-void ShapeEditor::set_item_lpe_point_parameter(SPItem */*item*/, SPObject */*lpeobject*/, const char * /*key*/) {
- g_message("ShapeEditor::set_item_lpe_point_parameter has not been implemented yet!");
+void
+ShapeEditor::set_knotholder(SPKnotHolder * knot_holder)
+{
+ unset_item();
+
+ this->grab_node = -1;
+
+ if (knot_holder) {
+ this->knotholder = knot_holder;
+ }
}