Code

noop: some more cosmetics in lpe-skeleton.(h|cpp)
[inkscape.git] / src / live_effects / lpe-skeleton.cpp
1 #define INKSCAPE_LPE_SKELETON_CPP
2 /** \file
3  * LPE <skeleton> implementation, used as an example for a base starting class
4  * when implementing new LivePathEffects.
5  *
6  * In vi, three global search-and-replaces will let you rename everything
7  * in this and the .h file:
8  *
9  *   :%s/SKELETON/YOURNAME/g
10  *   :%s/Skeleton/Yourname/g
11  *   :%s/skeleton/yourname/g
12  */
13 /*
14  * Authors:
15  *   Johan Engelen
16  *
17  * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
18  *
19  * Released under GNU GPL, read the file 'COPYING' for more information
20  */
22 #include "live_effects/lpe-skeleton.h"
24 // You might need to include other 2geom files. You can add them here:
25 #include <2geom/path.h>
27 namespace Inkscape {
28 namespace LivePathEffect {
30 LPESkeleton::LPESkeleton(LivePathEffectObject *lpeobject) :
31     Effect(lpeobject),
32     // initialise your parameters here:
33     number(_("Float parameter"), _("just a real number like 1.4!"), "svgname", &wr, this, 1.2)
34 {
35     // register all your parameters here, so Inkscape knows which parameters this effect has:
36     registerParameter( dynamic_cast<Parameter *>(&number) );
37 }
39 LPESkeleton::~LPESkeleton()
40 {
42 }
45 /* ########################
46  *  Choose to implement one of the doEffect functions. You can delete or comment out the others.
47  */
49 /*
50 void
51 LPESkeleton::doEffect (SPCurve * curve)
52 {
53     // spice this up to make the effect actually *do* something!
54 }
56 std::vector<Geom::Path>
57 LPESkeleton::doEffect_path (std::vector<Geom::Path> const & path_in)
58 {
59         std::vector<Geom::Path> path_out;
61         path_out = path_in;   // spice this up to make the effect actually *do* something!
63         return path_out;
64 }
65 */
67 Geom::Piecewise<Geom::D2<Geom::SBasis> >
68 LPESkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
69 {
70     Geom::Piecewise<Geom::D2<Geom::SBasis> > output;
72     output = pwd2_in;   // spice this up to make the effect actually *do* something!
74     return output;
75 }
77 /* ######################## */
79 } //namespace LivePathEffect
80 } /* namespace Inkscape */
82 /*
83   Local Variables:
84   mode:c++
85   c-file-style:"stroustrup"
86   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
87   indent-tabs-mode:nil
88   fill-column:99
89   End:
90 */
91 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :