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-test-doEffect-stack.cpp | 192 +++++++++++++-------------- 1 file changed, 96 insertions(+), 96 deletions(-) (limited to 'src/live_effects/lpe-test-doEffect-stack.cpp') diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp index 19f20b5a9..d071050e9 100644 --- a/src/live_effects/lpe-test-doEffect-stack.cpp +++ b/src/live_effects/lpe-test-doEffect-stack.cpp @@ -1,96 +1,96 @@ -#define INKSCAPE_LPE_DOEFFECT_STACK_CPP - -/* - * Copyright (C) Johan Engelen 2007 - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "live_effects/lpe-test-doEffect-stack.h" - -#include <2geom/piecewise.h> -#include -#include - -namespace Inkscape { -namespace LivePathEffect { - - -LPEdoEffectStackTest::LPEdoEffectStackTest(LivePathEffectObject *lpeobject) : - Effect(lpeobject), - step(_("Stack step"), (""), "step", &wr, this) -{ - registerParameter( dynamic_cast(&step) ); -} - -LPEdoEffectStackTest::~LPEdoEffectStackTest() -{ - -} - -void -LPEdoEffectStackTest::doEffect (SPCurve * curve) -{ - if (step >= 1) { - Effect::doEffect(curve); - } else { - // return here - return; - } -} - -NArtBpath * -LPEdoEffectStackTest::doEffect (NArtBpath * path_in) -{ - if (step >= 2) { - return Effect::doEffect(path_in); - } else { - // return here - 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)); - return path_out; - } -} - -std::vector -LPEdoEffectStackTest::doEffect (std::vector & path_in) -{ - if (step >= 3) { - return Effect::doEffect(path_in); - } else { - // return here - std::vector path_out = path_in; - return path_out; - } -} - -Geom::Piecewise > -LPEdoEffectStackTest::doEffect (Geom::Piecewise > & pwd2_in) -{ - Geom::Piecewise > output = pwd2_in; - - 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_DOEFFECT_STACK_CPP + +/* + * Copyright (C) Johan Engelen 2007 + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "live_effects/lpe-test-doEffect-stack.h" + +#include <2geom/piecewise.h> +#include +#include + +namespace Inkscape { +namespace LivePathEffect { + + +LPEdoEffectStackTest::LPEdoEffectStackTest(LivePathEffectObject *lpeobject) : + Effect(lpeobject), + step(_("Stack step"), (""), "step", &wr, this) +{ + registerParameter( dynamic_cast(&step) ); +} + +LPEdoEffectStackTest::~LPEdoEffectStackTest() +{ + +} + +void +LPEdoEffectStackTest::doEffect (SPCurve * curve) +{ + if (step >= 1) { + Effect::doEffect(curve); + } else { + // return here + return; + } +} + +NArtBpath * +LPEdoEffectStackTest::doEffect (NArtBpath * path_in) +{ + if (step >= 2) { + return Effect::doEffect(path_in); + } else { + // return here + 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)); + return path_out; + } +} + +std::vector +LPEdoEffectStackTest::doEffect (std::vector & path_in) +{ + if (step >= 3) { + return Effect::doEffect(path_in); + } else { + // return here + std::vector path_out = path_in; + return path_out; + } +} + +Geom::Piecewise > +LPEdoEffectStackTest::doEffect (Geom::Piecewise > & pwd2_in) +{ + Geom::Piecewise > output = pwd2_in; + + 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