Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
lpe-test-doEffect-stack.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
4 *
5 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
6 */
7
9
10// TODO due to internal breakage in glibmm headers, this must be last:
11#include <glibmm/i18n.h>
12
13namespace Inkscape {
14namespace LivePathEffect {
15
16
18 Effect(lpeobject),
19 step(_("Stack step:"), ("How deep we should go into the stack"), "step", &wr, this),
20 point(_("Point param:"), "tooltip of point parameter", "point_param", &wr, this),
21 path(_("Path param:"), "tooltip of path parameter", "path_param", &wr, this,"M 0,100 100,0")
22{
26
29}
30
32
34{
35 if (step >= 1) {
37 } else {
38 // return here
39 return;
40 }
41}
42
45{
46 if (step >= 2) {
47 return Effect::doEffect_path(path_in);
48 } else {
49 // return here
50 Geom::PathVector path_out = path_in;
51 return path_out;
52 }
53}
54
57{
59
60 return output;
61}
62
63
64} // namespace LivePathEffect
65} /* namespace Inkscape */
66
67/*
68 Local Variables:
69 mode:c++
70 c-file-style:"stroustrup"
71 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
72 indent-tabs-mode:nil
73 fill-column:99
74 End:
75*/
76// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
Adaptor that creates 2D functions from 1D ones.
Definition d2.h:55
Sequence of subpaths.
Definition pathvector.h:122
Function defined as discrete pieces.
Definition piecewise.h:71
void registerParameter(Parameter *param)
Definition effect.cpp:1704
virtual void doEffect(Geom::PathVector &curve)
Definition effect.cpp:1615
virtual Geom::PathVector doEffect_path(Geom::PathVector const &path_in)
Definition effect.cpp:1620
void doEffect(Geom::PathVector &curve) override
Geom::PathVector doEffect_path(Geom::PathVector const &path_in) override
Geom::Piecewise< Geom::D2< Geom::SBasis > > doEffect_pwd2(Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in) override
void set_oncanvas_looks(Inkscape::CanvasItemCtrlShape shape, std::uint32_t color)
Definition point.cpp:177
void param_setValue(Geom::Point newpoint, bool write=false)
Definition point.cpp:100
Helper class to stream background task notifications as a series of messages.
@ CANVAS_ITEM_CTRL_SHAPE_SQUARE
Definition curve.h:24