diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-10-30 22:37:20 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-10-30 22:37:20 +0000 |
| commit | 2fb0d596bc5823f8d72a8a4262e147231170c9cd (patch) | |
| tree | 8bee900fb0996e66b273f598174f67bd12375407 /src/live_effects/effect.cpp | |
| parent | r16896@shi: ted | 2007-10-30 12:16:06 -0700 (diff) | |
| download | inkscape-2fb0d596bc5823f8d72a8a4262e147231170c9cd.tar.gz inkscape-2fb0d596bc5823f8d72a8a4262e147231170c9cd.zip | |
LPE: implement NEW path-along-path effect, i think that old one has become obsolete and is renamed accordingly. implement straight path node editting for gears effect.
(bzr r3983)
Diffstat (limited to 'src/live_effects/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 3802066ec..859bf8230 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -29,6 +29,7 @@ // include effects: #include "live_effects/lpe-skeletalstrokes.h" +#include "live_effects/lpe-pathalongpath.h" #include "live_effects/lpe-slant.h" #include "live_effects/lpe-test-doEffect-stack.h" #include "live_effects/lpe-gears.h" @@ -40,7 +41,8 @@ namespace LivePathEffect { const Util::EnumData<EffectType> LPETypeData[INVALID_LPE] = { // {constant defined in effect.h, N_("name of your effect"), "name of your effect in SVG"} - {SKELETAL_STROKES, N_("Path along path"), "skeletal"}, + {PATH_ALONG_PATH, N_("Path along path"), "path_along_path"}, + {SKELETAL_STROKES, N_("[obsolete?] Pattern along path"), "skeletal"}, #ifdef LPE_ENABLE_TEST_EFFECTS {SLANT, N_("Slant"), "slant"}, {DOEFFECTSTACK_TEST, N_("doEffect stack test"), "doeffectstacktest"}, @@ -58,6 +60,9 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) case SKELETAL_STROKES: neweffect = (Effect*) new LPESkeletalStrokes(lpeobj); break; + case PATH_ALONG_PATH: + neweffect = (Effect*) new LPEPathAlongPath(lpeobj); + break; #ifdef LPE_ENABLE_TEST_EFFECTS case SLANT: neweffect = (Effect*) new LPESlant(lpeobj); @@ -91,6 +96,7 @@ Effect::Effect(LivePathEffectObject *lpeobject) tooltips = NULL; lpeobj = lpeobject; oncanvasedit_it = param_map.begin(); + straight_original_path = false; } Effect::~Effect() @@ -303,6 +309,16 @@ Effect::editNextParamOncanvas(SPItem * item, SPDesktop * desktop) } } +/* This function should reset the defaults and is used for example to initialize an effect right after it has been applied to a path +* The nice thing about this is that this function can use knowledge of the original path and set things accordingly for example to the size or origin of the original path! +*/ +void +Effect::resetDefaults(SPItem * /*item*/) +{ + // do nothing for simple effects +} + + } /* namespace LivePathEffect */ } /* namespace Inkscape */ |
