lpe-curvestitch.cpp revision c7e8a6c1f9a8bda454439dea4bff0638811c2409
#define INKSCAPE_LPE_EXPRESSION_CPP
/** \file
* SVG <skeleton> implementation, used as an example for a base starting class
* when implementing new LivePathEffects.
*
*/
/*
* Authors:
* Johan Engelen
*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-curvestitch.h"
#include <libnr/n-art-bpath.h>
#include "libnr/nr-values.h"
namespace Inkscape {
namespace LivePathEffect {
using namespace Geom;
strokepath(_("Stroke path"), _("The path that will be stroked, whatever, think of good text here."), "strokepath", &wr, this, "M0,0 L1,0"),
nrofpaths(_("Nr of paths"), _("The number of paths that will be generated."), "count", &wr, this, 5),
{
// startpoint_variation.param_set_range(-NR_HUGE, 1);
// endpoint_variation.param_set_range(-1, NR_HUGE);
}
{
}
{
// do this for all permutations if there are more than 2 paths? realllly cool!
Piecewise<D2<SBasis> > A = arc_length_parametrization(Piecewise<D2<SBasis> >(path_in[0].toPwSb()),2,.1);
Piecewise<D2<SBasis> > B = arc_length_parametrization(Piecewise<D2<SBasis> >(path_in[1].toPwSb()),2,.1);
for (int i = 0; i < nrofpaths; i++) {
if (startpoint_variation != 0)
if (endpoint_variation != 0)
tA += incrementA;
tB += incrementB;
}
return path_out;
} else {
return path_in;
}
}
} //namespace LivePathEffect
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :