summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-11-03 17:38:18 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-11-03 17:38:18 +0000
commit9b91f5d8683af39ec035e7116154a91d5d2ae4da (patch)
tree1de2839b488b4bf0d77a52979062ebab058c5a48 /src/live_effects/effect.cpp
parentfix compilation. added #include "libnr/nr-values.h" to snapped-line.cpp (diff)
downloadinkscape-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.cpp28
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 */