diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp
index 3aa1436322967a3aaa2b1929d36686f5145eef82..bb6d36fdc61b2a3d4232e4191fadf425d1fad7e2 100644 (file)
#include <2geom/piecewise.h>
#include <vector>
-#include <libnr/n-art-bpath.h>
#include <cstring>
using std::memcpy;
LPEdoEffectStackTest::LPEdoEffectStackTest(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
step(_("Stack step"), ("How deep we should go into the stack"), "step", &wr, this),
- point(_("point param"), "tooltip of point parameter", "point_param", &wr, this)
+ point(_("point param"), "tooltip of point parameter", "point_param", &wr, this),
+ path(_("path param"), "tooltip of path parameter", "path_param", &wr, this,"M 0,100 100,0")
{
registerParameter( dynamic_cast<Parameter *>(&step) );
registerParameter( dynamic_cast<Parameter *>(&point) );
+ registerParameter( dynamic_cast<Parameter *>(&path) );
point.set_oncanvas_looks(SP_KNOT_SHAPE_SQUARE, SP_KNOT_MODE_XOR, 0x00ff0000);
}
}
}
-NArtBpath *
-LPEdoEffectStackTest::doEffect_nartbpath (NArtBpath * path_in)
-{
- if (step >= 2) {
- return Effect::doEffect_nartbpath(path_in);
- } else {
- // return here
- NArtBpath *path_out;
-
- unsigned ret = 0;
- while ( path_in[ret].code != NR_END ) {
- ++ret;
- }
- unsigned len = ++ret;
-
- path_out = g_new(NArtBpath, len);
- memcpy(path_out, path_in, len * sizeof(NArtBpath));
- return path_out;
- }
-}
-
std::vector<Geom::Path>
LPEdoEffectStackTest::doEffect_path (std::vector<Geom::Path> const & path_in)
{
- if (step >= 3) {
+ if (step >= 2) {
return Effect::doEffect_path(path_in);
} else {
// return here