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/effect.cpp | |
| 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/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 859bf8230..03a27b6da 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -35,6 +35,8 @@ #include "live_effects/lpe-gears.h" #include "live_effects/lpe-curvestitch.h" +#include "nodepath.h" + namespace Inkscape { namespace LivePathEffect { @@ -96,7 +98,6 @@ Effect::Effect(LivePathEffectObject *lpeobject) tooltips = NULL; lpeobj = lpeobject; oncanvasedit_it = param_map.begin(); - straight_original_path = false; } Effect::~Effect() @@ -255,13 +256,13 @@ Effect::getWidget() } -Inkscape::XML::Node * +Inkscape::XML::Node * Effect::getRepr() { return SP_OBJECT_REPR(lpeobj); } -SPDocument * +SPDocument * Effect::getSPDoc() { if (SP_OBJECT_DOCUMENT(lpeobj) == NULL) g_message("Effect::getSPDoc() returns NULL"); @@ -269,6 +270,19 @@ Effect::getSPDoc() } Parameter * +Effect::getParameter(const char * key) +{ + Glib::ustring stringkey(key); + + param_map_type::iterator it = param_map.find(stringkey); + if (it != param_map.end()) { + return it->second; + } else { + return NULL; + } +} + +Parameter * Effect::getNextOncanvasEditableParam() { oncanvasedit_it++; @@ -318,6 +332,14 @@ Effect::resetDefaults(SPItem * /*item*/) // do nothing for simple effects } +void +Effect::setup_notepath(Inkscape::NodePath::Path *np) +{ + np->show_helperpath = true; + np->helperpath_rgba = 0xff0000ff; + np->helperpath_width = 1.0; +} + } /* namespace LivePathEffect */ |
