Creating Live Path Effects
Instructions for making Live Path Effects.
It is best to put your new effect in the /live_effects directory. Copy lpe-skeleton.cpp and lpe-skeleton.h to your files, and rename everything from skeleton to your name.
Add your effect to the enumeration in effect.h: "enum EffectType". This way, Inkscape knows how to refer to your effect.
Add your effect to the "const Util::EnumData<EffectType> LPETypeData[INVALID_LPE]" array in /live_effects/effect.cpp. 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.
Write your effect:
Have a look at the doEffect functions of lpe-slant.cpp and lpe-skeleton.cpp to see what is possible and how to implement something!
- RealParam: a number of type 'gdouble'. (see lpe-slant.cpp to learn how to use this type)
- PointParam: a parameter that describes a coordinate on the page (see lpe-skeletal.cpp to learn how to use this type)
- PathParam: a parameter that is a path. (see lpe-skeletal.cpp to learn how to use this type)
- EnumParam: a parameter that lets the user choose between a number of options from a dropdown box. (see lpe-skeletal.cpp to learn how to use this type)