diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-11-03 17:38:18 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-11-03 17:38:18 +0000 |
| commit | 9b91f5d8683af39ec035e7116154a91d5d2ae4da (patch) | |
| tree | 1de2839b488b4bf0d77a52979062ebab058c5a48 /src/live_effects/parameter | |
| parent | fix compilation. added #include "libnr/nr-values.h" to snapped-line.cpp (diff) | |
| download | inkscape-9b91f5d8683af39ec035e7116154a91d5d2ae4da.tar.gz inkscape-9b91f5d8683af39ec035e7116154a91d5d2ae4da.zip | |
make setup_notepath function for LPE's and LPE parameters.
(bzr r4018)
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/parameter.h | 5 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 9 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index a41d5f7c6..614f799c0 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -25,6 +25,10 @@ namespace Gtk { namespace Inkscape { +namespace NodePath { + class Path ; +} + namespace LivePathEffect { class Effect; @@ -49,6 +53,7 @@ public: virtual Glib::ustring * param_getTooltip() { return ¶m_tooltip; }; virtual void param_editOncanvas(SPItem * item, SPDesktop * dt) { return; }; + virtual void param_setup_notepath(Inkscape::NodePath::Path *np) { return; }; Glib::ustring param_key; Inkscape::UI::Widget::Registry * param_wr; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 68f7be4a9..53e15c9a5 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -31,6 +31,7 @@ #include "node-context.h" #include "desktop-handles.h" #include "selection.h" +#include "nodepath.h" namespace Inkscape { @@ -141,6 +142,14 @@ PathParam::param_editOncanvas(SPItem * item, SPDesktop * dt) } void +PathParam::param_setup_notepath(Inkscape::NodePath::Path *np) +{ + np->show_helperpath = true; + np->helperpath_rgba = 0x009000ff; + np->helperpath_width = 1.0; +} + +void PathParam::param_write_to_repr(const char * svgd) { param_effect->getRepr()->setAttribute(param_key.c_str(), svgd); diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h index 23f168c48..2f8c766bd 100644 --- a/src/live_effects/parameter/path.h +++ b/src/live_effects/parameter/path.h @@ -47,6 +47,7 @@ public: void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath); void param_editOncanvas(SPItem * item, SPDesktop * dt); + void param_setup_notepath(Inkscape::NodePath::Path *np); sigc::signal <void> signal_path_pasted; sigc::signal <void> signal_path_changed; |
