diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-01-12 22:12:14 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-01-12 22:12:14 +0000 |
| commit | 64e60300f6690bdf1482fa67d368ef98889b7817 (patch) | |
| tree | 5b0ea6132eca648c29e4d52fc499eaac9fd40cfe /src | |
| parent | lpe knot: code cleanup. mostly adding parens to if-statement predicates that ... (diff) | |
| download | inkscape-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')
| -rw-r--r-- | src/live_effects/effect.cpp | 20 | ||||
| -rw-r--r-- | src/live_effects/effect.h | 2 |
2 files changed, 8 insertions, 14 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); } diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index b9d86628f..1da9b4cc9 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -90,7 +90,7 @@ public: // (but spiro lpe still needs it!) virtual LPEPathFlashType pathFlashType() const { return DEFAULT; } void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); - std::vector<Geom::PathVector> getHelperPaths(SPLPEItem const* lpeitem); + std::vector<Geom::PathVector> getCanvasIndicators(SPLPEItem const* lpeitem); inline bool providesOwnFlashPaths() const { return provides_own_flash_paths || show_orig_path; |
