summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/point.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-08 17:33:58 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-08 17:33:58 +0000
commitad092a3d734fcec79273f957e8d86c7a9ceb767b (patch)
treed1df1e2ac1ae259e7d8958990011fc3cba69d59a /src/live_effects/parameter/point.cpp
parentAdd 'Mode' label and icon for regular Bezier mode in pen/pencil toolbar (diff)
downloadinkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.tar.gz
inkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.zip
Make knotholders for LPE items finally work; each effect can now overload the addKnotHolderHandles() method to add handles which control its parameters.
There is now also a virtual onKnotUngrabbed() method for each knotholder entity which can be used to do cleanup tasks (for LPE parameters it currently writes the value to SVG, although this should probably happen automatically) (bzr r5855)
Diffstat (limited to 'src/live_effects/parameter/point.cpp')
-rw-r--r--src/live_effects/parameter/point.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 49a47660f..502af1f23 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -162,12 +162,33 @@ PointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint
knot_color = color;
}
+void
+PointParam::knot_set(NR::Point const &p, NR::Point const &origin, guint state)
+{
+ g_print ("PointParam::knot_set() was called!\n");
+ param_setValue(p.to_2geom());
+}
+
+NR::Point
+PointParam::knot_get()
+{
+ g_print ("PointParam::knot_get() was called.\n");
+ g_print ("We return (%f, %f)\n", (*this)[0], (*this)[1]);
+ return *this;
+}
+
+void
+PointParam::knot_click(guint state)
+{
+ g_print ("PointParam::knot_click() was called!\n");
+}
// CALLBACKS:
void
PointParam::on_button_click()
{
+ g_print ("PointParam::on_button_click()\n");
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPItem * item = sp_desktop_selection(desktop)->singleItem();
if (item != NULL) {