

The first doEffect function calls the second, which calls the 3rd, which calls the 4th. You have to choose between 4 doEffect functions and implement just one of them. The doEffect function receives the original path, and should return the path that results from your effect. The effect code should go into a doEffect function. Time to start writing the main machinery of your cool effect! That's all! Now your effect should pop up in the LivePathEffect dialog in Inkscape! But your effect won't do anything now, it would just pass along the original path. (Be aware of the spaces and tabs in that file!) One more thing to do: add your files to /live_effects/Makefile_insert. Neweffect = (Effect*) new LPEYourEffect(lpeobj) Tell inkscape how to create it by inserting it inĮffect::New(EffectType lpenr, LivePathEffectObject *lpeobj) This way, Inkscape knows how to tell the user what the name of the effect is and also how to write its name to SVG. Add your effect to the "const Util::EnumData LPETypeData" array.

Add #include "live_effects/lpe-youreffect.h" (below //include effects ) This way, Inkscape knows how to refer to your effect. Copy lpe-skeleton.cpp and lpe-skeleton.h to your files (say lpe-youreffect.cpp and lpe-youreffect.h), and rename everything from skeleton to your name.Īdd your effect to the enumeration: "enum EffectType".

It is best to put your new effect in the /live_effects directory. The parameters can be paths, numbers, points, text, in principle anything. What is very important to notice is that output style equals original style. The original style and path are from the path that the effect is applied on. The following schematic tries to explain how LPE work.
