summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-01-12 22:12:14 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-01-12 22:12:14 +0000
commit64e60300f6690bdf1482fa67d368ef98889b7817 (patch)
tree5b0ea6132eca648c29e4d52fc499eaac9fd40cfe /src/live_effects/effect.cpp
parentlpe knot: code cleanup. mostly adding parens to if-statement predicates that ... (diff)
downloadinkscape-64e60300f6690bdf1482fa67d368ef98889b7817.tar.gz
inkscape-64e60300f6690bdf1482fa67d368ef98889b7817.zip
LPE: rename function getHelperPaths --> getCanvasIndicators (the function is not yet called by anyone, but the naming was confusing)
(bzr r12920)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 70ce1e89d..12990ee24 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -486,11 +486,13 @@ Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
}
/**
- * Return a vector of PathVectors which contain all helperpaths that should be drawn by the effect.
- * This is the function called by external code like SPLPEItem.
+ * Return a vector of PathVectors which contain all canvas indicators for this effect.
+ * This is the function called by external code to get all canvas indicators (effect and its parameters)
+ * lpeitem = the item onto which this effect is applied
+ * @todo change return type to one pathvector, add all paths to one pathvector instead of maintaining a vector of pathvectors
*/
std::vector<Geom::PathVector>
-Effect::getHelperPaths(SPLPEItem const* lpeitem)
+Effect::getCanvasIndicators(SPLPEItem const* lpeitem)
{
std::vector<Geom::PathVector> hp_vec;
@@ -499,18 +501,10 @@ Effect::getHelperPaths(SPLPEItem const* lpeitem)
return hp_vec;
}
- // TODO: we can probably optimize this by using a lot more references
- // rather than copying PathVectors all over the place
- if (show_orig_path) {
- // add original path to helperpaths
- SPCurve* curve = SP_SHAPE(lpeitem)->getCurve ();
- hp_vec.push_back(curve->get_pathvector());
- }
-
- // add other helperpaths provided by the effect itself
+ // add indicators provided by the effect itself
addCanvasIndicators(lpeitem, hp_vec);
- // add helperpaths provided by the effect's parameters
+ // add indicators provided by the effect's parameters
for (std::vector<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
(*p)->addCanvasIndicators(lpeitem, hp_vec);
}