From 9b91f5d8683af39ec035e7116154a91d5d2ae4da Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 3 Nov 2007 17:38:18 +0000 Subject: make setup_notepath function for LPE's and LPE parameters. (bzr r4018) --- src/live_effects/effect.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'src/live_effects/effect.cpp') 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,19 +256,32 @@ 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"); return SP_OBJECT_DOCUMENT(lpeobj); } +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() { @@ -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 */ -- cgit v1.2.3