lpe-skeleton.cpp revision 9c98649e3d8a72e28d77c9a7fed9df899d50db73
#define INKSCAPE_LPE_SKELETON_CPP
/** \file
* SVG <skeleton> implementation, used as an example for a base starting class
* when implementing new LivePathEffects.
*
* In vi, three global search-and-replaces will let you rename everything
* in this and the .h file:
*
*/
/*
* 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-skeleton.h"
#include <libnr/n-art-bpath.h>
// You might need to include other 2geom files. You can add them here:
namespace Inkscape {
namespace LivePathEffect {
// initialise your parameters here:
{
// register all your parameters here, so Inkscape knows which parameters this effect has:
}
{
}
/* ########################
* Choose to implement one of the doEffect functions. You can delete or comment out the others.
*/
/*
void
LPESkeleton::doEffect (SPCurve * curve)
{
// spice this up to make the effect actually *do* something!
}
NArtBpath *
LPESkeleton::doEffect (NArtBpath * path_in)
{
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)); // spice this up to make the effect actually *do* something!
return path_out;
}
std::vector<Geom::Path>
LPESkeleton::doEffect (std::vector<Geom::Path> & path_in)
{
std::vector<Geom::Path> path_out;
path_out = path_in; // spice this up to make the effect actually *do* something!
return path_out;
}
*/
{
return output;
}
/* ######################## */
} //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 :