diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-03-20 23:00:52 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-03-20 23:00:52 +0000 |
| commit | 887dd72ac8da405acdbf4c34336c93577e4d17a3 (patch) | |
| tree | db35247fa2ecf953c2d8c19102b90234c76bde0e /src/live_effects/parameter/point.cpp | |
| parent | Change from Level3 to Level2 Views (diff) | |
| download | inkscape-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/live_effects/parameter/point.cpp')
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 075f7544f..841d11d27 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -7,6 +7,7 @@ */ #include "live_effects/parameter/point.h" +#include "live_effects/parameter/pointparam-knotholder.h" #include "live_effects/effect.h" #include "svg/svg.h" #include "svg/stringstream.h" @@ -133,8 +134,13 @@ PointParam::param_editOncanvas(SPItem * item, SPDesktop * dt) tools_switch_current(TOOLS_NODES); } - ShapeEditor * shape_editor = SP_NODE_CONTEXT( dt->event_context )->shape_editor; - shape_editor->set_item_lpe_point_parameter(item, SP_OBJECT(param_effect->getLPEObj()), param_key.c_str()); + PointParamKnotHolder * kh = pointparam_knot_holder_new( dt, SP_OBJECT(param_effect->getLPEObj()), param_key.c_str(), item); + if (kh) { + pointparam_knot_holder_add_full(kh, * dynamic_cast<Geom::Point *>( this ), NULL, knot_shape, knot_mode, knot_color, param_getTooltip()->c_str() ); + + ShapeEditor * shape_editor = SP_NODE_CONTEXT( dt->event_context )->shape_editor; + shape_editor->set_knotholder(kh); + } } @@ -146,6 +152,15 @@ PointParam::param_transform_multiply(Geom::Matrix const& postmul, bool /*set*/) } +void +PointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color) +{ + knot_shape = shape; + knot_mode = mode; + knot_color = color; +} + + // CALLBACKS: void |
