Code

remove many needless references to n-art-bpath.h
[inkscape.git] / src / live_effects / lpe-test-doEffect-stack.cpp
1 #define INKSCAPE_LPE_DOEFFECT_STACK_CPP
3 /*
4  * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
5  *
6  * Released under GNU GPL, read the file 'COPYING' for more information
7  */
9 #include "live_effects/lpe-test-doEffect-stack.h"
11 #include <2geom/piecewise.h>
12 #include <vector>
13 #include <cstring>
14 using std::memcpy;
16 namespace Inkscape {
17 namespace LivePathEffect {
20 LPEdoEffectStackTest::LPEdoEffectStackTest(LivePathEffectObject *lpeobject) :
21     Effect(lpeobject),
22     step(_("Stack step"), ("How deep we should go into the stack"), "step", &wr, this),
23     point(_("point param"), "tooltip of point parameter", "point_param", &wr, this)
24 {
25     registerParameter( dynamic_cast<Parameter *>(&step) );
26     registerParameter( dynamic_cast<Parameter *>(&point) );
28     point.set_oncanvas_looks(SP_KNOT_SHAPE_SQUARE, SP_KNOT_MODE_XOR, 0x00ff0000);
29 }
31 LPEdoEffectStackTest::~LPEdoEffectStackTest()
32 {
34 }
36 void
37 LPEdoEffectStackTest::doEffect (SPCurve * curve)
38 {
39     if (step >= 1) {
40         Effect::doEffect(curve);
41     } else {
42         // return here
43         return;
44     }
45 }
47 std::vector<Geom::Path>
48 LPEdoEffectStackTest::doEffect_path (std::vector<Geom::Path> const & path_in)
49 {
50     if (step >= 2) {
51         return Effect::doEffect_path(path_in);
52     } else {
53         // return here
54         std::vector<Geom::Path> path_out = path_in;
55         return path_out;
56     }
57 }
59 Geom::Piecewise<Geom::D2<Geom::SBasis> > 
60 LPEdoEffectStackTest::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
61 {
62     Geom::Piecewise<Geom::D2<Geom::SBasis> > output = pwd2_in;
64     return output;
65 }
68 } // namespace LivePathEffect
69 } /* namespace Inkscape */
71 /*
72   Local Variables:
73   mode:c++
74   c-file-style:"stroustrup"
75   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
76   indent-tabs-mode:nil
77   fill-column:99
78   End:
79 */
80 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :