From b7403d737c0549e540393bfe92160a5fc7b407a1 Mon Sep 17 00:00:00 2001 From: Peter Moulder Date: Thu, 11 Oct 2007 14:30:52 +0000 Subject: trivial: live_effects/**: svn propset svn:eol-style native *.h *.cpp. (bzr r3884) --- src/live_effects/lpe-skeleton.cpp | 218 +++++++++++++++++++------------------- 1 file changed, 109 insertions(+), 109 deletions(-) (limited to 'src/live_effects/lpe-skeleton.cpp') diff --git a/src/live_effects/lpe-skeleton.cpp b/src/live_effects/lpe-skeleton.cpp index a2cd470b7..13356972e 100644 --- a/src/live_effects/lpe-skeleton.cpp +++ b/src/live_effects/lpe-skeleton.cpp @@ -1,109 +1,109 @@ -#define INKSCAPE_LPE_SKELETON_CPP -/** \file - * SVG 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: - * - * :%s/SKELETON/YOURNAME/g - * :%s/Skeleton/Yourname/g - * :%s/skeleton/yourname/g - */ -/* - * Authors: - * Johan Engelen -* -* Copyright (C) Johan Engelen 2007 - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "live_effects/lpe-skeleton.h" -#include "display/curve.h" -#include - -// You might need to include other 2geom files. You can add them here: -#include <2geom/path.h> - -namespace Inkscape { -namespace LivePathEffect { - -LPESkeleton::LPESkeleton(LivePathEffectObject *lpeobject) : - Effect(lpeobject), - // initialise your parameters here: - number(_("Float parameter"), _("just a real number like 1.4!"), "svgname", &wr, this, 1.2) -{ - // register all your parameters here, so Inkscape knows which parameters this effect has: - registerParameter( dynamic_cast(&number) ); -} - -LPESkeleton::~LPESkeleton() -{ - -} - - -/* ######################## - * 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 -LPESkeleton::doEffect (std::vector & path_in) -{ - std::vector path_out; - - path_out = path_in; // spice this up to make the effect actually *do* something! - - return path_out; -} -*/ - -Geom::Piecewise > -LPESkeleton::doEffect (Geom::Piecewise > & pwd2_in) -{ - Geom::Piecewise > output; - - output = pwd2_in; // spice this up to make the effect actually *do* something! - - 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 : +#define INKSCAPE_LPE_SKELETON_CPP +/** \file + * SVG 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: + * + * :%s/SKELETON/YOURNAME/g + * :%s/Skeleton/Yourname/g + * :%s/skeleton/yourname/g + */ +/* + * Authors: + * Johan Engelen +* +* Copyright (C) Johan Engelen 2007 + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "live_effects/lpe-skeleton.h" +#include "display/curve.h" +#include + +// You might need to include other 2geom files. You can add them here: +#include <2geom/path.h> + +namespace Inkscape { +namespace LivePathEffect { + +LPESkeleton::LPESkeleton(LivePathEffectObject *lpeobject) : + Effect(lpeobject), + // initialise your parameters here: + number(_("Float parameter"), _("just a real number like 1.4!"), "svgname", &wr, this, 1.2) +{ + // register all your parameters here, so Inkscape knows which parameters this effect has: + registerParameter( dynamic_cast(&number) ); +} + +LPESkeleton::~LPESkeleton() +{ + +} + + +/* ######################## + * 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 +LPESkeleton::doEffect (std::vector & path_in) +{ + std::vector path_out; + + path_out = path_in; // spice this up to make the effect actually *do* something! + + return path_out; +} +*/ + +Geom::Piecewise > +LPESkeleton::doEffect (Geom::Piecewise > & pwd2_in) +{ + Geom::Piecewise > output; + + output = pwd2_in; // spice this up to make the effect actually *do* something! + + 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 : -- cgit v1.2.3