summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-08-23 16:39:36 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-08-23 16:39:36 +0000
commita8d5997ca58774796bff56a69dad64260cbbc36a (patch)
tree118d24026afd40a10b4e3fccafab520856f82a69 /src/live_effects/effect.cpp
parentupdate to trunk lp:inkscape 13530 (fixes Windows build) (diff)
downloadinkscape-a8d5997ca58774796bff56a69dad64260cbbc36a.tar.gz
inkscape-a8d5997ca58774796bff56a69dad64260cbbc36a.zip
To help the SVG WG discussion on powerstroke, a quick code-up of centripetal Catmull-Rom interpolation. The code probably needs a clean up pass, and more generally, the interpolation functions should move into 2geom or at least into a .cpp file.
- Add Catmull-Rom interpolation to powerstroke interpolation options - Add LPE Interpolate points (bzr r13341.1.156)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index dc61701df..540eb99d4 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -43,6 +43,7 @@
#include "live_effects/lpe-ruler.h"
#include "live_effects/lpe-boolops.h"
#include "live_effects/lpe-interpolate.h"
+#include "live_effects/lpe-interpolate_points.h"
#include "live_effects/lpe-text_label.h"
#include "live_effects/lpe-path_length.h"
#include "live_effects/lpe-line_segment.h"
@@ -127,6 +128,7 @@ const Util::EnumData<EffectType> LPETypeData[] = {
/* 0.91 */
{POWERSTROKE, N_("Power stroke"), "powerstroke"},
{CLONE_ORIGINAL, N_("Clone original path"), "clone_original"},
+/* EXPERIMENTAL */
{SHOW_HANDLES, N_("Show handles"), "show_handles"},
{ROUGHEN, N_("Roughen"), "roughen"},
{BSPLINE, N_("BSpline"), "bspline"},
@@ -135,6 +137,7 @@ const Util::EnumData<EffectType> LPETypeData[] = {
// TRANSLATORS: "Envelope Perspective" should be equivalent to "perspective transformation"
{ENVELOPE_PERSPECTIVE, N_("Envelope Perspective"), "envelope-perspective"},
{FILLET_CHAMFER, N_("Fillet/Chamfer"), "fillet-chamfer"},
+ {INTERPOLATE_POINTS, N_("Interpolate points"), "interpolate_points"},
};
const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData));
@@ -231,6 +234,9 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
case INTERPOLATE:
neweffect = static_cast<Effect*> ( new LPEInterpolate(lpeobj) );
break;
+ case INTERPOLATE_POINTS:
+ neweffect = static_cast<Effect*> ( new LPEInterpolatePoints(lpeobj) );
+ break;
case TEXT_LABEL:
neweffect = static_cast<Effect*> ( new LPETextLabel(lpeobj) );
break;